From 3a7fd644def01d19815f69f43b2ae4bb3feaf630 Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Tue, 23 Apr 2024 14:51:29 -0700 Subject: [PATCH] Rename colors --- common/components/applications.user.nix | 6 ++-- common/components/editor.user.nix | 48 ++++++++++++------------- common/components/git.user.nix | 22 ++++++------ common/components/terminal.user.nix | 10 +++--- common/resources/palette.nix | 40 +++++++++++---------- common/system.nix | 2 +- 6 files changed, 65 insertions(+), 63 deletions(-) diff --git a/common/components/applications.user.nix b/common/components/applications.user.nix index aa963e4..b0347d4 100644 --- a/common/components/applications.user.nix +++ b/common/components/applications.user.nix @@ -148,9 +148,9 @@ in cpu-colors = imap0 (i: c: mkTuple [ (mkUint32 i) c ]) ( { "6" = [ red orange yellow green blue purple ]; - "8" = [ red orange-red orange yellow green teal blue purple ]; - "12" = [ red alt-red orange alt-orange yellow alt-yellow green alt-green blue alt-blue purple alt-purple ]; - "16" = [ red alt-red orange-red alt-orange-red orange alt-orange yellow alt-yellow green alt-green teal alt-teal blue alt-blue purple alt-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 ]; }."${toString host.cores}" ); mem-color = orange; diff --git a/common/components/editor.user.nix b/common/components/editor.user.nix index f72a3a9..dd614d4 100644 --- a/common/components/editor.user.nix +++ b/common/components/editor.user.nix @@ -175,7 +175,7 @@ in # "textlink.foreground" = "#ff7042"; "terminal.foreground" = white; "terminal.background" = black; - "terminal.ansiblack" = dark-gray; + "terminal.ansiblack" = gray-dark; "terminal.ansired" = red; "terminal.ansigreen" = green; "terminal.ansiyellow" = yellow; @@ -200,15 +200,15 @@ in "editorOverviewRuler.deletedForeground" = purple; "editorOverviewRuler.modifiedForeground" = purple; "gitDecoration.modifiedResourceForeground" = purple; - "gitDecoration.untrackedResourceForeground" = dark-purple; + "gitDecoration.untrackedResourceForeground" = purple-dark; "editorMarkerNavigationWarning.background" = orange; "editorOverviewRuler.warningForeground" = orange; "editorWarning.foreground" = orange; "list.warningForeground" = orange; - "diffEditor.removedLineBackground" = "${dark-orange-red}44"; - "diffEditor.removedTextBackground" = dark-orange-red; - "diffEditor.insertedTextBackground" = dark-teal; - "diffEditor.insertedLineBackground" = "${dark-teal}22"; + "diffEditor.removedLineBackground" = "${vermilion-dark}44"; + "diffEditor.removedTextBackground" = vermilion-dark; + "diffEditor.insertedTextBackground" = teal-dark; + "diffEditor.insertedLineBackground" = "${teal-dark}22"; "commandCenter.background" = "#1b1b1b"; "commandCenter.border" = "#00000000"; "commandCenter.inactiveBorder" = "#00000000"; @@ -219,37 +219,37 @@ in "editor.findMatchHighlightBackground" = "#00000000"; "editor.findMatchHighlightBorder" = "#aaaaaa"; "editor.selectionHighlightBackground" = "#464646"; - "editorError.foreground" = dark-red; - "editorMarkerNavigationError.background" = dark-red; - "editorOverviewRuler.errorForeground" = dark-red; - "gitDecoration.conflictingResourceForeground" = dark-red; - "inputValidation.errorBackground" = dark-red; - "list.errorForeground" = dark-red; - "list.invalidItemForeground" = dark-red; - "editorBracketHighlight.unexpectedBracket.foreground" = dark-red; - "editorBracketHighlight.foreground1" = alt-teal; - "editorBracketHighlight.foreground2" = alt-purple; - "editorBracketHighlight.foreground3" = alt-teal; - "editorBracketHighlight.foreground4" = alt-purple; - "editorBracketHighlight.foreground5" = alt-teal; - "editorBracketHighlight.foreground6" = alt-purple; + "editorError.foreground" = red-dark; + "editorMarkerNavigationError.background" = red-dark; + "editorOverviewRuler.errorForeground" = red-dark; + "gitDecoration.conflictingResourceForeground" = red-dark; + "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; }; "editor.tokenColorCustomizations" = { textMateRules = [ { scope = "constant.numeric"; settings = { foreground = yellow; }; } - { scope = "constant.other.caps"; settings = { foreground = light-gray; }; } + { scope = "constant.other.caps"; settings = { foreground = platinum; }; } { scope = "entity.name.function.macro"; settings = { foreground = blue; }; } { scope = "entity.name.namespace"; settings = { foreground = purple; }; } { scope = "entity.name.type.lifetime"; settings = { foreground = orange; fontStyle = "italic"; }; } { scope = "entity.name.type.numeric"; settings = { foreground = purple; fontStyle = ""; }; } { scope = "entity.name.type.primitive"; settings = { foreground = purple; fontStyle = ""; }; } { scope = "entity.name.type"; settings = { foreground = purple; fontStyle = "underline"; }; } - { scope = "keyword.operator.access.dot"; settings = { foreground = light-gray; }; } + { scope = "keyword.operator.access.dot"; settings = { foreground = platinum; }; } { scope = "keyword.operator.attribute"; settings = { foreground = blue; }; } { scope = "keyword.operator.borrow"; settings = { foreground = orange; }; } - { scope = "keyword.operator.namespace"; settings = { foreground = light-gray; }; } + { scope = "keyword.operator.namespace"; settings = { foreground = platinum; }; } { scope = "meta.attribute"; settings = { foreground = blue; }; } - { scope = "meta.interpolation"; settings = { foreground = light-gray; }; } + { scope = "meta.interpolation"; settings = { foreground = platinum; }; } { scope = "punctuation.brackets.angle.rust, keyword.operator.namespace.rust"; settings = { foreground = purple; }; } { scope = "punctuation.definition.interpolation"; settings = { foreground = red; }; } { scope = "punctuation.definition.lifetime"; settings = { foreground = orange; fontStyle = "italic"; }; } diff --git a/common/components/git.user.nix b/common/components/git.user.nix index 21527f9..b7c63b9 100644 --- a/common/components/git.user.nix +++ b/common/components/git.user.nix @@ -54,20 +54,20 @@ in with palette.hex; { file-renamed-label = "moved:"; line-numbers-left-format = "{nm:>1} "; - line-numbers-left-style = "${dark-gray} bold"; - line-numbers-minus-style = "${dark-orange-red} bold"; - line-numbers-plus-style = "${dark-teal} bold"; + line-numbers-left-style = "${gray-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 = "${dark-gray} bold"; - line-numbers-zero-style = "${dark-gray} bold"; - minus-emph-style = "${dark-orange-red-text-contrast} ${dark-orange-red}"; - minus-empty-line-marker-style = "normal ${dark-orange-red}"; + line-numbers-right-style = "${gray-dark} bold"; + line-numbers-zero-style = "${gray-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-style = "${dark-orange-red-text-contrast} ${dark-orange-red}"; - plus-emph-style = "syntax ${dark-teal}"; - plus-empty-line-marker-style = "normal ${dark-teal}"; + minus-style = "${vermilion-dark-contrast-minimum} ${vermilion-dark}"; + plus-emph-style = "syntax ${teal-dark}"; + plus-empty-line-marker-style = "normal ${teal-dark}"; plus-non-emph-style = "syntax dim"; - plus-style = "syntax ${dark-teal}"; + plus-style = "syntax ${teal-dark}"; syntax-theme = "Monokai Extended"; whitespace-error-style = "reverse white"; wrap-max-lines = "unlimited"; diff --git a/common/components/terminal.user.nix b/common/components/terminal.user.nix index 215def1..9ad30ce 100644 --- a/common/components/terminal.user.nix +++ b/common/components/terminal.user.nix @@ -108,16 +108,16 @@ in background = black; cursor = orange; url_color = white; - active_border_color = dark-gray; - inactive_border_color = dark-gray; + active_border_color = gray-dark; + inactive_border_color = gray-dark; bell_border_color = red; active_tab_foreground = white; - active_tab_background = dark-gray; + active_tab_background = gray-dark; inactive_tab_foreground = gray; - inactive_tab_background = dark-gray; + inactive_tab_background = gray-dark; selection_foreground = black; selection_background = orange; - color0 = dark-gray; + color0 = gray-dark; color1 = red; color2 = green; color3 = yellow; diff --git a/common/resources/palette.nix b/common/resources/palette.nix index fe37939..4d51670 100644 --- a/common/resources/palette.nix +++ b/common/resources/palette.nix @@ -8,7 +8,7 @@ let ansiNames = [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ]; oklch = rec { - # Monokai + # 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; }; @@ -19,26 +19,28 @@ let white = { l = 0.98; c = 0.000; h = 0; }; yellow = { l = 0.88; c = 0.125; h = 103; }; - # Extended - orange-red = { l = 0.68; c = 0.205; h = 36; }; + # Base extension + platinum = { l = 0.90; c = 0.000; h = 0; }; teal = { l = 0.81; c = 0.152; h = 171; }; + vermilion = { l = 0.68; c = 0.205; h = 36; }; - # Derived - alt-blue = blue // { l = 0.76; }; - alt-green = green // { l = 0.77; c = 0.198; }; - alt-orange = orange // { l = 0.70; c = 0.161; }; - alt-orange-red = orange-red // { l = 0.61; }; - alt-purple = purple // { l = 0.64; }; - alt-red = red // { l = 0.57; c = 0.217; }; - alt-teal = teal // { l = 0.74; c = 0.144; }; - alt-yellow = yellow // { l = 0.81; }; - dark-gray = gray // { l = 0.35; }; - dark-orange-red = orange-red // { l = 0.34; c = 0.060; }; - dark-orange-red-text-contrast = orange-red // { l = 0.60; c = 0.030; }; - dark-purple = purple // { l = 0.47; }; - dark-red = red // { l = 0.54; c = 0.216; }; - dark-teal = teal // { l = 0.36; c = 0.060; }; - light-gray = gray // { l = 0.90; }; + # 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; }; + + # 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; }; }; in rec { diff --git a/common/system.nix b/common/system.nix index 8202424..ad967ea 100644 --- a/common/system.nix +++ b/common/system.nix @@ -73,7 +73,7 @@ in console.packages = with pkgs; [ terminus_font ]; console.font = "ter-v32n"; console.colors = map (removePrefix "#") (with palette.hex; [ - "#000000" red green yellow blue orange purple light-gray + "#000000" red green yellow blue orange purple platinum gray red green yellow blue orange purple white ]);