commit 3aacece95df4fa9620475d16fb26a5023d8e4fc8
Author: Anjeel <xein@zepp.club>
Date: Mon, 15 Jul 2024 02:11:35 -0300
git: upload
Diffstat:
3 files changed, 125 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -0,0 +1,32 @@
+vis-cosmic
+----------------------------
+
+## Overview
+
+**Cosmic Latte** is a color scheme inspired by the average color of the universe. This project is a port for the **Vis** text editor. The original colorscheme is not created by me; it is based on [Cosmic Latte by Haystack Android](https://github.com/haystackandroid/cosmic_latte).
+
+## Installation
+
+Use vis-plug or just download the cosmic.lua and put in ur themes directory.
+
+# Activation
+Example configuration for Vis
+
+```
+require('vis')
+vis.events.subscribe(vis.events.INIT, function()
+ -- Your global configuration options
+ vis:command('set theme cosmic')
+ vis:command('set autoindent on')
+end)
+```
+
+## License
+
+This project is licensed under the **MIT License**.
+
+---
+
+### Credits
+
+- **Original Colorscheme:** [Cosmic Latte by Haystack Android](https://github.com/haystackandroid/cosmic_latte)
diff --git a/cosmic.lua b/cosmic.lua
@@ -0,0 +1,56 @@
+local lexers = vis.lexers
+local colors = {
+ ['base00'] = '#202a31', -- bgi -- gry0/grys
+ -- You might notice a slight difference in the actual background color; this is due to the fake true color here in Vis. ;( To work around this, you can leave the value of base00 empty if you are also using the dark cosmic latte colorscheme for your terminal.
+ ['base0A'] = '#abb0c0', -- fg -- gry3
+ -- normal colors
+ ['base01'] = '#c17b8d', -- red -- sprd/red_
+ ['base02'] = '#7d9761', -- green -- gren
+ ['base03'] = '#b28761', -- yellow -- srch/gold
+ ['base04'] = '#5496bd', -- blue -- spbl
+ ['base05'] = '#9b85bb', -- magenta -- spmg/mgnt
+ ['base06'] = '#459d90', -- cyan -- spcy
+ ['base07'] = '#abb0c0', -- white
+ -- bright colors
+ ['base08'] = '#898f9e', -- black -- gry2
+ ['base09'] = '#4c5764', -- -- gryp
+ ['base10'] = '#202a31', -- bg2 -- grys
+ ['base15'] = '#c5cbdb', -- white -- gryc
+ ['base16'] = '#2b3740', -- -- gry1
+}
+lexers.colors = colors
+local fg = ',fore:'..colors.base0A..','
+local bg = ',back:'..colors.base00..','
+lexers.STYLE_DEFAULT = bg..fg
+lexers.STYLE_NOTHING = bg
+lexers.STYLE_CLASS = 'fore:'..colors.base05
+lexers.STYLE_COMMENT = 'fore:'..colors.base08
+lexers.STYLE_CONSTANT = 'fore:'..colors.base04
+lexers.STYLE_DEFINITION = 'fore:'..colors.base06
+lexers.STYLE_ERROR = 'fore:'..colors.base01
+lexers.STYLE_FUNCTION = 'fore:'..colors.base01
+lexers.STYLE_KEYWORD = 'fore:'..colors.base02
+lexers.STYLE_LABEL = 'fore:'..colors.base02
+lexers.STYLE_NUMBER = 'fore:'..colors.base04
+lexers.STYLE_OPERATOR = 'fore:'..colors.base02
+lexers.STYLE_REGEX = 'fore:'..colors.base0A
+lexers.STYLE_STRING = 'fore:'..colors.base04
+lexers.STYLE_PREPROCESSOR = 'fore:'..colors.base06
+lexers.STYLE_TAG = 'fore:'..colors.base03
+lexers.STYLE_TYPE = 'fore:'..colors.base05
+lexers.STYLE_VARIABLE = 'fore:'..colors.base05
+lexers.STYLE_WHITESPACE = ''
+lexers.STYLE_EMBEDDED = 'back:'..colors.base08
+lexers.STYLE_IDENTIFIER = fg
+
+lexers.STYLE_LINENUMBER = 'fore:'..colors.base08
+lexers.STYLE_CURSOR = 'fore:'..colors.base08..',back:'..colors.base09
+lexers.STYLE_CURSOR_PRIMARY = 'fore:'..colors.base15..',back:'..colors.base09
+lexers.STYLE_CURSOR_LINE = 'back:'..colors.base08
+lexers.STYLE_COLOR_COLUMN = 'back:'..colors.base16
+lexers.STYLE_SELECTION = 'back:'..colors.base0A
+lexers.STYLE_STATUS_FOCUSED = 'back:'..colors.base0A..',fore:'..colors.base10
+lexers.STYLE_STATUS = 'back:'..colors.base10..',fore:'..colors.base0A
+lexers.STYLE_INFO = 'fore:default,back:default,bold'
+lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
+
diff --git a/terminals/st/config.h b/terminals/st/config.h
@@ -0,0 +1,36 @@
+/* Terminal colors (16 first used in escape sequence) */
+static const char *colorname[] = {
+
+ /* 8 normal colors */
+ [0] = "#202a31", /* black */
+ [1] = "#c17b8d", /* red */
+ [2] = "#7d9761", /* green */
+ [3] = "#b28761", /* yellow */
+ [4] = "#5496bd", /* blue */
+ [5] = "#9b85bb", /* magenta */
+ [6] = "#459d90", /* cyan */
+ [7] = "#abb0c0", /* white */
+
+ /* 8 bright colors */
+ [8] = "#898f9e", /* black */
+ [9] = "#c17b8d", /* red */
+ [10] = "#7d9761", /* green */
+ [11] = "#b28761", /* yellow */
+ [12] = "#5496bd", /* blue */
+ [13] = "#9b85bb", /* magenta */
+ [14] = "#459d90", /* cyan */
+ [15] = "#c5cbdb", /* white */
+
+ /* special colors */
+ [256] = "#202a31", /* background */
+ [257] = "#abb0c0", /* foreground */
+};
+
+/*
+ * Default colors (colorname index)
+ * foreground, background, cursor
+ */
+unsigned int defaultfg = 257;
+unsigned int defaultbg = 256;
+unsigned int defaultcs = 257;
+static unsigned int defaultrcs = 256;
+\ No newline at end of file