diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/colors.zig | 2 | ||||
| -rw-r--r-- | src/themes/monokai.zig | 84 |
2 files changed, 86 insertions, 0 deletions
diff --git a/src/colors.zig b/src/colors.zig index 40a48c1c..9729aec8 100644 --- a/src/colors.zig +++ b/src/colors.zig @@ -332,6 +332,7 @@ const curated = struct { pub const dracula = @import("themes/dracula.zig"); pub const dracula_soft = @import("themes/dracula_soft.zig"); pub const alucard = @import("themes/alucard.zig"); + pub const monokai = @import("themes/monokai.zig"); // The legacy pair last. pub const helix = @import("themes/helix.zig"); pub const dark = @import("themes/dark.zig"); @@ -397,6 +398,7 @@ const theme_groups = [_]ThemeGroup{ .{ .title = "Visual Studio Code", .first = "dark_plus" }, .{ .title = "Solarized", .first = "solarized_dark" }, .{ .title = "Dracula", .first = "dracula" }, + .{ .title = "Monokai", .first = "monokai" }, .{ .title = "Legacy themes", .first = "helix" }, }; diff --git a/src/themes/monokai.zig b/src/themes/monokai.zig new file mode 100644 index 00000000..13e72336 --- /dev/null +++ b/src/themes/monokai.zig @@ -0,0 +1,84 @@ +//! Monokai: Monokai, as close to the original as pardes can draw it. +//! Every value is the original's own, cited on its line (path:line key); the +//! chrome pardes needs and the original lacks is derived from its palette. +//! Sources: +//! Sublime Text 2.0.2's Monokai.tmTheme (Wimer Hazenberg), from 'Color Scheme - Default.sublime-package'; url https://download.sublimetext.com/Sublime%20Text%202.0.2%20x64.tar.bz2; genizah ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme +//! Tags: the tab (focused = the active tab, unfocused = the inactive one). +//! Adjusted to meet pardes's floors (chrome only; text, syntax and ANSI are untouched): +//! - focused tag ground #49483e -> #59584f: 1.19:1 off the unfocused #3e3d32, pardes needs 1.5:1 on a dark page +//! - rules between panes #3b3a32 -> #4a4941: 1.30:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does) +pub const theme = .{ + .name = "monokai", + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:13 background + .bg = .{ 0x27, 0x28, 0x22 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground + .fg = .{ 0xf8, 0xf8, 0xf2 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:23 selection + .sel_bg = .{ 0x49, 0x48, 0x3e }, + // the original keeps text colours over its selection; its text colour + .sel_fg = .{ 0xf8, 0xf8, 0xf2 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:21 lineHighlight — derived: no UI colours in a tmTheme; unfocused tag = lineHighlight + .tag_bg = .{ 0x3e, 0x3d, 0x32 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground — derived: foreground + .tag_fg = .{ 0xf8, 0xf8, 0xf2 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:23 selection — derived: focused tag = selection #49483e, adjusted + .tag_active_bg = .{ 0x59, 0x58, 0x4f }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground — derived: foreground + .tag_active_fg = .{ 0xf8, 0xf8, 0xf2 }, + // the focused grip: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground — derived: Keyword pink + .box = .{ 0xf9, 0x26, 0x72 }, + // derived: the grip at rest, the accent #f92672 faded toward the unfocused tag #3e3d32 as far as 1.6:1 off it (0.54 of the way) + .box_dim = .{ 0xa3, 0x31, 0x55 }, + // an unsaved grip: the original's modified colour, ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:66 "String" foreground — derived: diff.changed #E6DB74 + .box_dirty = .{ 0xe6, 0xdb, 0x74 }, + // derived: the column grip, the original's type colour, ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:148 "Storage type" foreground + .column_box = .{ 0x66, 0xd9, 0xef }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground + .kw = .{ 0xf9, 0x26, 0x72 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:66 "String" foreground + .str = .{ 0xe6, 0xdb, 0x74 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:77 "Number" foreground + .num = .{ 0xae, 0x81, 0xff }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:55 "Comment" foreground + .comment = .{ 0x75, 0x71, 0x5e }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:55 "Comment" foreground — derived: the tmTheme has no gutter colour; Comment + .lineno = .{ 0x75, 0x71, 0x5e }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground — derived: foreground + .lineno_active = .{ 0xf8, 0xf8, 0xf2 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:13 background — derived: page + .scroll_track = .{ 0x27, 0x28, 0x22 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:23 selection — derived: selection + .scroll_thumb = .{ 0x49, 0x48, 0x3e }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:19 invisibles — derived: invisibles #3b3a32, adjusted + .border = .{ 0x4a, 0x49, 0x41 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:25 findHighlight + .search_bg = .{ 0xff, 0xe7, 0x92 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:27 findHighlightForeground + .search_fg = .{ 0x00, 0x00, 0x00 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground — derived: Invalid is drawn on #F92672, the Keyword colour + .diagnostic_error = .{ 0xf9, 0x26, 0x72 }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:200 "Function argument" foreground — derived: Function argument orange + .diagnostic_warning = .{ 0xfd, 0x97, 0x1f }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:148 "Storage type" foreground — derived: Storage type cyan + .diagnostic_info = .{ 0x66, 0xd9, 0xef }, + // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:55 "Comment" foreground — derived: Comment + .diagnostic_hint = .{ 0x75, 0x71, 0x5e }, + .palette = .{ + .{ 0x27, 0x28, 0x22 }, // 0: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:13 background — derived: ANSI 0: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xf9, 0x26, 0x72 }, // 1: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground — derived: ANSI 1: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xa6, 0xe2, 0x2e }, // 2: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:187 "Function name" foreground — derived: ANSI 2: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xe6, 0xdb, 0x74 }, // 3: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:66 "String" foreground — derived: ANSI 3: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0x66, 0xd9, 0xef }, // 4: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:148 "Storage type" foreground — derived: ANSI 4: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xae, 0x81, 0xff }, // 5: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:77 "Number" foreground — derived: ANSI 5: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0x66, 0xd9, 0xef }, // 6: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:148 "Storage type" foreground — derived: ANSI 6: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xf8, 0xf8, 0xf2 }, // 7: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground — derived: ANSI 7: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0x75, 0x71, 0x5e }, // 8: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:55 "Comment" foreground — derived: ANSI 8: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xf9, 0x26, 0x72 }, // 9: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground — derived: ANSI 9: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xa6, 0xe2, 0x2e }, // 10: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:187 "Function name" foreground — derived: ANSI 10: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xe6, 0xdb, 0x74 }, // 11: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:66 "String" foreground — derived: ANSI 11: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0x66, 0xd9, 0xef }, // 12: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:148 "Storage type" foreground — derived: ANSI 12: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xae, 0x81, 0xff }, // 13: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:77 "Number" foreground — derived: ANSI 13: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0x66, 0xd9, 0xef }, // 14: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:148 "Storage type" foreground — derived: ANSI 14: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + .{ 0xf8, 0xf8, 0xf2 }, // 15: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground — derived: ANSI 15: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat) + }, +}; |
