Normalize derived colors
This commit is contained in:
parent
3a7fd644de
commit
f8c243ae89
6 changed files with 49 additions and 44 deletions
|
@ -149,8 +149,8 @@ in
|
|||
{
|
||||
"6" = [ red orange yellow green blue purple ];
|
||||
"8" = [ red vermilion orange yellow green teal blue purple ];
|
||||
"12" = [ red red-alt orange orange-alt yellow yellow-alt green green-alt blue blue-alt purple purple-alt ];
|
||||
"16" = [ red red-alt vermilion vermilion-alt orange orange-alt yellow yellow-alt green green-alt teal teal-alt blue blue-alt purple purple-alt ];
|
||||
"12" = [ red red-dim orange orange-dim yellow yellow-dim green green-dim blue blue-dim purple purple-dim ];
|
||||
"16" = [ red red-dim vermilion vermilion-dim orange orange-dim yellow yellow-dim green green-dim teal teal-dim blue blue-dim purple purple-dim ];
|
||||
}."${toString host.cores}"
|
||||
);
|
||||
mem-color = orange;
|
||||
|
|
|
@ -175,7 +175,7 @@ in
|
|||
# "textlink.foreground" = "#ff7042";
|
||||
"terminal.foreground" = white;
|
||||
"terminal.background" = black;
|
||||
"terminal.ansiblack" = gray-dark;
|
||||
"terminal.ansiblack" = white-dark;
|
||||
"terminal.ansired" = red;
|
||||
"terminal.ansigreen" = green;
|
||||
"terminal.ansiyellow" = yellow;
|
||||
|
@ -183,7 +183,7 @@ in
|
|||
"terminal.ansimagenta" = orange;
|
||||
"terminal.ansicyan" = purple;
|
||||
"terminal.ansiwhite" = white;
|
||||
"terminal.ansibrightblack" = gray;
|
||||
"terminal.ansibrightblack" = white-dim;
|
||||
"terminal.ansibrightred" = red;
|
||||
"terminal.ansibrightgreen" = green;
|
||||
"terminal.ansibrightyellow" = yellow;
|
||||
|
@ -219,20 +219,20 @@ in
|
|||
"editor.findMatchHighlightBackground" = "#00000000";
|
||||
"editor.findMatchHighlightBorder" = "#aaaaaa";
|
||||
"editor.selectionHighlightBackground" = "#464646";
|
||||
"editorError.foreground" = red-dark;
|
||||
"editorError.foreground" = red;
|
||||
"editorMarkerNavigationError.background" = red-dark;
|
||||
"editorOverviewRuler.errorForeground" = red-dark;
|
||||
"gitDecoration.conflictingResourceForeground" = red-dark;
|
||||
"editorOverviewRuler.errorForeground" = red;
|
||||
"gitDecoration.conflictingResourceForeground" = red;
|
||||
"inputValidation.errorBackground" = red-dark;
|
||||
"list.errorForeground" = red-dark;
|
||||
"list.invalidItemForeground" = red-dark;
|
||||
"editorBracketHighlight.unexpectedBracket.foreground" = red-dark;
|
||||
"editorBracketHighlight.foreground1" = teal-alt;
|
||||
"editorBracketHighlight.foreground2" = purple-alt;
|
||||
"editorBracketHighlight.foreground3" = teal-alt;
|
||||
"editorBracketHighlight.foreground4" = purple-alt;
|
||||
"editorBracketHighlight.foreground5" = teal-alt;
|
||||
"editorBracketHighlight.foreground6" = purple-alt;
|
||||
"list.errorForeground" = red;
|
||||
"list.invalidItemForeground" = red;
|
||||
"editorBracketHighlight.unexpectedBracket.foreground" = red;
|
||||
"editorBracketHighlight.foreground1" = teal;
|
||||
"editorBracketHighlight.foreground2" = purple;
|
||||
"editorBracketHighlight.foreground3" = teal;
|
||||
"editorBracketHighlight.foreground4" = purple;
|
||||
"editorBracketHighlight.foreground5" = teal;
|
||||
"editorBracketHighlight.foreground6" = purple;
|
||||
};
|
||||
"editor.tokenColorCustomizations" = {
|
||||
textMateRules = [
|
||||
|
|
|
@ -54,15 +54,15 @@ in
|
|||
with palette.hex; {
|
||||
file-renamed-label = "moved:";
|
||||
line-numbers-left-format = "{nm:>1} ";
|
||||
line-numbers-left-style = "${gray-dark} bold";
|
||||
line-numbers-left-style = "${white-dark} bold";
|
||||
line-numbers-minus-style = "${vermilion-dark} bold";
|
||||
line-numbers-plus-style = "${teal-dark} bold";
|
||||
line-numbers-right-format = "{np:>1}▐";
|
||||
line-numbers-right-style = "${gray-dark} bold";
|
||||
line-numbers-zero-style = "${gray-dark} bold";
|
||||
line-numbers-right-style = "${white-dark} bold";
|
||||
line-numbers-zero-style = "${white-dark} bold";
|
||||
minus-emph-style = "${vermilion-dark-contrast-minimum} ${vermilion-dark}";
|
||||
minus-empty-line-marker-style = "normal ${vermilion-dark}";
|
||||
minus-non-emph-style = "${gray} dim";
|
||||
minus-non-emph-style = "${white-dim} dim";
|
||||
minus-style = "${vermilion-dark-contrast-minimum} ${vermilion-dark}";
|
||||
plus-emph-style = "syntax ${teal-dark}";
|
||||
plus-empty-line-marker-style = "normal ${teal-dark}";
|
||||
|
|
|
@ -108,16 +108,16 @@ in
|
|||
background = black;
|
||||
cursor = orange;
|
||||
url_color = white;
|
||||
active_border_color = gray-dark;
|
||||
inactive_border_color = gray-dark;
|
||||
active_border_color = white-dark;
|
||||
inactive_border_color = white-dark;
|
||||
bell_border_color = red;
|
||||
active_tab_foreground = white;
|
||||
active_tab_background = gray-dark;
|
||||
inactive_tab_foreground = gray;
|
||||
inactive_tab_background = gray-dark;
|
||||
active_tab_background = white-dark;
|
||||
inactive_tab_foreground = white-dim;
|
||||
inactive_tab_background = white-dark;
|
||||
selection_foreground = black;
|
||||
selection_background = orange;
|
||||
color0 = gray-dark;
|
||||
color0 = white-dark;
|
||||
color1 = red;
|
||||
color2 = green;
|
||||
color3 = yellow;
|
||||
|
@ -125,7 +125,7 @@ in
|
|||
color5 = orange;
|
||||
color6 = purple;
|
||||
color7 = white;
|
||||
color8 = gray;
|
||||
color8 = white-dim;
|
||||
color9 = red;
|
||||
color10 = green;
|
||||
color11 = yellow;
|
||||
|
|
|
@ -5,13 +5,17 @@ let
|
|||
inherit (lib) concatLines imap0 mapAttrsRecursive mapAttrsToList nameValuePair;
|
||||
inherit (import ./lib.nix { inherit lib; }) oklchToRgb rgbToHex round;
|
||||
|
||||
# TODO: Automatically clamp to sRGB
|
||||
dark = c: c // { l = 0.35; c = if c.c == 0 then 0 else 0.060; };
|
||||
dim = c: c // { l = 0.50; c = if c.c == 0 then 0 else 0.150; };
|
||||
contrast-minimum = c: c // { l = c.l + 0.25 * (if c.l < 0.5 then 1 else - 1); };
|
||||
|
||||
ansiNames = [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
|
||||
|
||||
oklch = rec {
|
||||
# Base Monokai
|
||||
black = { l = 0.22; c = 0.000; h = 0; };
|
||||
blue = { l = 0.83; c = 0.108; h = 212; };
|
||||
gray = { l = 0.51; c = 0.000; h = 0; };
|
||||
green = { l = 0.84; c = 0.204; h = 127; };
|
||||
orange = { l = 0.77; c = 0.168; h = 62; };
|
||||
purple = { l = 0.70; c = 0.181; h = 298; };
|
||||
|
@ -24,23 +28,24 @@ let
|
|||
teal = { l = 0.81; c = 0.152; h = 171; };
|
||||
vermilion = { l = 0.68; c = 0.205; h = 36; };
|
||||
|
||||
# Alternate
|
||||
blue-alt = blue // { l = 0.76; };
|
||||
green-alt = green // { l = 0.77; c = 0.198; };
|
||||
orange-alt = orange // { l = 0.70; c = 0.161; };
|
||||
purple-alt = purple // { l = 0.64; };
|
||||
red-alt = red // { l = 0.57; c = 0.217; };
|
||||
teal-alt = teal // { l = 0.74; c = 0.144; };
|
||||
vermilion-alt = vermilion // { l = 0.61; };
|
||||
yellow-alt = yellow // { l = 0.81; };
|
||||
# Dim
|
||||
blue-dim = dim blue // { c = 0.087; };
|
||||
green-dim = dim green // { c = 0.128; };
|
||||
orange-dim = dim orange // { c = 0.115; };
|
||||
purple-dim = dim purple;
|
||||
red-dim = dim red;
|
||||
teal-dim = dim teal // { c = 0.097; };
|
||||
vermilion-dim = dim vermilion;
|
||||
white-dim = dim white;
|
||||
yellow-dim = dim yellow // { c = 0.105; };
|
||||
|
||||
# Dark
|
||||
gray-dark = gray // { l = 0.35; };
|
||||
purple-dark = purple // { l = 0.47; };
|
||||
red-dark = red // { l = 0.54; c = 0.216; };
|
||||
teal-dark = teal // { l = 0.36; c = 0.060; };
|
||||
vermilion-dark = vermilion // { l = 0.34; c = 0.060; };
|
||||
vermilion-dark-contrast-minimum = vermilion // { l = 0.60; c = 0.030; };
|
||||
purple-dark = dark purple;
|
||||
red-dark = dark red;
|
||||
teal-dark = dark teal;
|
||||
vermilion-dark = dark vermilion;
|
||||
vermilion-dark-contrast-minimum = contrast-minimum vermilion-dark;
|
||||
white-dark = dark white;
|
||||
};
|
||||
in
|
||||
rec {
|
||||
|
|
|
@ -74,7 +74,7 @@ in
|
|||
console.font = "ter-v32n";
|
||||
console.colors = map (removePrefix "#") (with palette.hex; [
|
||||
"#000000" red green yellow blue orange purple platinum
|
||||
gray red green yellow blue orange purple white
|
||||
white-dim red green yellow blue orange purple white
|
||||
]);
|
||||
|
||||
# Power
|
||||
|
|
Loading…
Reference in a new issue