~misterio/nix-colors

9cb443fa0e2394854f4702a092cf76338a456ee5 — Gabriel Fontes 4 months ago 98e4275
feat: add vim scheme, split lib up
5 files changed, 434 insertions(+), 138 deletions(-)

M lib/default.nix
A lib/from-picture.nix
A lib/gtk-theme.nix
A lib/nix-wallpaper.nix
A lib/vim-theme.nix
M lib/default.nix => lib/default.nix +18 -138
@@ 1,11 1,5 @@
{ pkgs }:

let
  rendersvg = pkgs.runCommandNoCC "rendersvg" { } ''
    mkdir -p $out/bin
    ln -s ${pkgs.resvg}/bin/resvg $out/bin/rendersvg
  '';
in
{
  # Takes a scheme, resulting wallpaper height and width, plus logo scale, and ouputs the generated wallpaper path
  # Example:


@@ 15,40 9,7 @@ in
  #   height = 1080;
  #   logoScale = 5.0;
  # };
  nixWallpaperFromScheme = { scheme, width, height, logoScale }:
    pkgs.stdenv.mkDerivation {
      name = "generated-nix-wallpaper-${scheme.slug}.png";
      src = pkgs.writeTextFile {
        name = "template.svg";
        text = ''
          <svg width="${toString width}" height="${
            toString height
          }" version="1.1" xmlns="http://www.w3.org/2000/svg">
            <rect width="${toString width}" height="${
              toString height
            }" fill="#${scheme.colors.base01}"/>
            <svg x="${toString (width / 2 - (logoScale * 50))}" y="${
              toString (height / 2 - (logoScale * 50))
            }" version="1.1" xmlns="http://www.w3.org/2000/svg">
              <g transform="scale(${toString logoScale})">
                <g transform="matrix(.19936 0 0 .19936 80.161 27.828)">
                  <path d="m-53.275 105.84-122.2-211.68 56.157-0.5268 32.624 56.869 32.856-56.565 27.902 0.011 14.291 24.69-46.81 80.49 33.229 57.826zm-142.26 92.748 244.42 0.012-27.622 48.897-65.562-0.1813 32.559 56.737-13.961 24.158-28.528 0.031-46.301-80.784-66.693-0.1359zm-9.3752-169.2-122.22 211.67-28.535-48.37 32.938-56.688-65.415-0.1717-13.942-24.169 14.237-24.721 93.111 0.2937 33.464-57.69z" fill="#${scheme.colors.base0C}"/>
                  <path d="m-97.659 193.01 122.22-211.67 28.535 48.37-32.938 56.688 65.415 0.1716 13.941 24.169-14.237 24.721-93.111-0.2937-33.464 57.69zm-9.5985-169.65-244.42-0.012 27.622-48.897 65.562 0.1813-32.559-56.737 13.961-24.158 28.528-0.031 46.301 80.784 66.693 0.1359zm-141.76 93.224 122.2 211.68-56.157 0.5268-32.624-56.869-32.856 56.565-27.902-0.011-14.291-24.69 46.81-80.49-33.229-57.826z" fill="#${scheme.colors.base0D}" style="isolation:auto;mix-blend-mode:normal"/>
                </g>
              </g>
            </svg>
          </svg>
        '';
      };
      buildInputs = with pkgs; [ inkscape ];
      unpackPhase = "true";
      buildPhase = ''
        inkscape --export-type="png" $src -w ${toString width} -h ${
          toString height
        } -o wallpaper.png
      '';
      installPhase = "install -Dm0644 wallpaper.png $out";
    };
  nixWallpaperFromScheme = import ./nix-wallpaper.nix { inherit pkgs; };

  # Takes a picture path and a scheme kind ("dark" or "light"), and outputs a colorscheme based on it
  # Please note the path must be accessible by your flake on pure mode


@@ 57,108 18,27 @@ in
  #   path = ./my/cool/wallpaper.png;
  #   kind = "dark";
  # };
  colorschemeFromPicture = { path, kind }:
    import (pkgs.stdenv.mkDerivation {
      name = "generated-colorscheme";
      buildInputs = with pkgs; [ flavours ];
      unpackPhase = "true";
      buildPhase = ''
        template=$(cat <<-END
        {
          slug = "$(basename ${path} | cut -d '.' -f1)-${kind}";
          name = "Generated";
          author = "nix-colors";
          colors = {
            base00 = "{{base00-hex}}";
            base01 = "{{base01-hex}}";
            base02 = "{{base02-hex}}";
            base03 = "{{base03-hex}}";
            base04 = "{{base04-hex}}";
            base05 = "{{base05-hex}}";
            base06 = "{{base06-hex}}";
            base07 = "{{base07-hex}}";
            base08 = "{{base08-hex}}";
            base09 = "{{base09-hex}}";
            base0A = "{{base0A-hex}}";
            base0B = "{{base0B-hex}}";
            base0C = "{{base0C-hex}}";
            base0D = "{{base0D-hex}}";
            base0E = "{{base0E-hex}}";
            base0F = "{{base0F-hex}}";
          };
        }
        END
        )
  colorschemeFromPicture = import ./from-picture.nix { inherit pkgs; };

        flavours generate "${kind}" "${path}" --stdout | \
        flavours build <( tee ) <( echo "$template" ) > default.nix
      '';
      installPhase = "mkdir -p $out && cp default.nix $out";
    });
  # Takes a scheme, ouputs a generated materia GTK theme
  # Example:
  # theme.package = gtkThemeFromScheme {
  # gtk.theme.package = gtkThemeFromScheme {
  #   scheme = config.colorscheme;
  # };
  gtkThemeFromScheme = { scheme }:
    pkgs.stdenv.mkDerivation rec {
      name = "generated-gtk-theme-${scheme.slug}";
      src = pkgs.fetchFromGitHub {
        owner = "nana-4";
        repo = "materia-theme";
        rev = "76cac96ca7fe45dc9e5b9822b0fbb5f4cad47984";
        sha256 = "sha256-0eCAfm/MWXv6BbCl2vbVbvgv8DiUH09TAUhoKq7Ow0k=";
        fetchSubmodules = true;
      };
      buildInputs = with pkgs; [
        sassc
        bc
        which
        rendersvg
        meson
        ninja
        nodePackages.sass
        gtk4.dev
        optipng
      ];
      phases = [ "unpackPhase" "installPhase" ];
      installPhase = ''
        HOME=/build
        chmod 777 -R .
        patchShebangs .
        mkdir -p $out/share/themes
        mkdir bin
        sed -e 's/handle-horz-.*//' -e 's/handle-vert-.*//' -i ./src/gtk-2.0/assets.txt
  gtkThemeFromScheme = import ./gtk-theme.nix { inherit pkgs; };

        cat > /build/gtk-colors << EOF
          BTN_BG=${scheme.colors.base02}
          BTN_FG=${scheme.colors.base06}
          FG=${scheme.colors.base05}
          BG=${scheme.colors.base00}
          HDR_BTN_BG=${scheme.colors.base01}
          HDR_BTN_FG=${scheme.colors.base05}
          ACCENT_BG=${scheme.colors.base0B}
          ACCENT_FG=${scheme.colors.base00}
          HDR_FG=${scheme.colors.base05}
          HDR_BG=${scheme.colors.base02}
          MATERIA_SURFACE=${scheme.colors.base02}
          MATERIA_VIEW=${scheme.colors.base01}
          MENU_BG=${scheme.colors.base02}
          MENU_FG=${scheme.colors.base06}
          SEL_BG=${scheme.colors.base0D}
          SEL_FG=${scheme.colors.base0E}
          TXT_BG=${scheme.colors.base02}
          TXT_FG=${scheme.colors.base06}
          WM_BORDER_FOCUS=${scheme.colors.base05}
          WM_BORDER_UNFOCUS=${scheme.colors.base03}
          UNITY_DEFAULT_LAUNCHER_STYLE=False
          NAME=${scheme.slug}
          MATERIA_STYLE_COMPACT=True
        EOF

        echo "Changing colours:"
        ./change_color.sh -o ${scheme.slug} /build/gtk-colors -i False -t "$out/share/themes"
        chmod 555 -R .
      '';
    };
  # Takes a scheme, ouputs a vim theme package.
  #
  # The output theme name will be "nix-" followed by the coloscheme's slug, and
  # should be set, for example, by adding to your vim config:
  # "colorscheme nix-${config.colorscheme.slug}"
  #
  # Example:
  # programs.vim.plugins = [
  #   {
  #     plugin = vimThemeFromScheme { scheme = config.colorscheme; };
  #     config = "colorscheme ${config.colorscheme.slug}";
  #   }
  # ];
  vimThemeFromScheme = import ./vim-theme.nix { inherit pkgs; };
}

A lib/from-picture.nix => lib/from-picture.nix +38 -0
@@ 0,0 1,38 @@
{ pkgs }: { path, kind }:
import (pkgs.stdenv.mkDerivation {
  name = "generated-colorscheme";
  buildInputs = with pkgs; [ flavours ];
  unpackPhase = "true";
  buildPhase = ''
    template=$(cat <<-END
    {
      slug = "$(basename ${path} | cut -d '.' -f1)-${kind}";
      name = "Generated";
      author = "nix-colors";
      colors = {
        base00 = "{{base00-hex}}";
        base01 = "{{base01-hex}}";
        base02 = "{{base02-hex}}";
        base03 = "{{base03-hex}}";
        base04 = "{{base04-hex}}";
        base05 = "{{base05-hex}}";
        base06 = "{{base06-hex}}";
        base07 = "{{base07-hex}}";
        base08 = "{{base08-hex}}";
        base09 = "{{base09-hex}}";
        base0A = "{{base0A-hex}}";
        base0B = "{{base0B-hex}}";
        base0C = "{{base0C-hex}}";
        base0D = "{{base0D-hex}}";
        base0E = "{{base0E-hex}}";
        base0F = "{{base0F-hex}}";
      };
    }
    END
    )

    flavours generate "${kind}" "${path}" --stdout | \
    flavours build <( tee ) <( echo "$template" ) > default.nix
  '';
  installPhase = "mkdir -p $out && cp default.nix $out";
})

A lib/gtk-theme.nix => lib/gtk-theme.nix +68 -0
@@ 0,0 1,68 @@
{ pkgs }: { scheme }:

let
  rendersvg = pkgs.runCommandNoCC "rendersvg" { } ''
    mkdir -p $out/bin
    ln -s ${pkgs.resvg}/bin/resvg $out/bin/rendersvg
  '';
in
pkgs.stdenv.mkDerivation rec {
  name = "generated-gtk-theme-${scheme.slug}";
  src = pkgs.fetchFromGitHub {
    owner = "nana-4";
    repo = "materia-theme";
    rev = "76cac96ca7fe45dc9e5b9822b0fbb5f4cad47984";
    sha256 = "sha256-0eCAfm/MWXv6BbCl2vbVbvgv8DiUH09TAUhoKq7Ow0k=";
    fetchSubmodules = true;
  };
  buildInputs = with pkgs; [
    sassc
    bc
    which
    rendersvg
    meson
    ninja
    nodePackages.sass
    gtk4.dev
    optipng
  ];
  phases = [ "unpackPhase" "installPhase" ];
  installPhase = ''
    HOME=/build
    chmod 777 -R .
    patchShebangs .
    mkdir -p $out/share/themes
    mkdir bin
    sed -e 's/handle-horz-.*//' -e 's/handle-vert-.*//' -i ./src/gtk-2.0/assets.txt

    cat > /build/gtk-colors << EOF
      BTN_BG=${scheme.colors.base02}
      BTN_FG=${scheme.colors.base06}
      FG=${scheme.colors.base05}
      BG=${scheme.colors.base00}
      HDR_BTN_BG=${scheme.colors.base01}
      HDR_BTN_FG=${scheme.colors.base05}
      ACCENT_BG=${scheme.colors.base0B}
      ACCENT_FG=${scheme.colors.base00}
      HDR_FG=${scheme.colors.base05}
      HDR_BG=${scheme.colors.base02}
      MATERIA_SURFACE=${scheme.colors.base02}
      MATERIA_VIEW=${scheme.colors.base01}
      MENU_BG=${scheme.colors.base02}
      MENU_FG=${scheme.colors.base06}
      SEL_BG=${scheme.colors.base0D}
      SEL_FG=${scheme.colors.base0E}
      TXT_BG=${scheme.colors.base02}
      TXT_FG=${scheme.colors.base06}
      WM_BORDER_FOCUS=${scheme.colors.base05}
      WM_BORDER_UNFOCUS=${scheme.colors.base03}
      UNITY_DEFAULT_LAUNCHER_STYLE=False
      NAME=${scheme.slug}
      MATERIA_STYLE_COMPACT=True
    EOF

    echo "Changing colours:"
    ./change_color.sh -o ${scheme.slug} /build/gtk-colors -i False -t "$out/share/themes"
    chmod 555 -R .
  '';
}

A lib/nix-wallpaper.nix => lib/nix-wallpaper.nix +34 -0
@@ 0,0 1,34 @@
{ pkgs }: { scheme, width, height, logoScale }:
pkgs.stdenv.mkDerivation {
  name = "generated-nix-wallpaper-${scheme.slug}.png";
  src = pkgs.writeTextFile {
    name = "template.svg";
    text = ''
      <svg width="${toString width}" height="${
        toString height
      }" version="1.1" xmlns="http://www.w3.org/2000/svg">
        <rect width="${toString width}" height="${
          toString height
        }" fill="#${scheme.colors.base01}"/>
        <svg x="${toString (width / 2 - (logoScale * 50))}" y="${
          toString (height / 2 - (logoScale * 50))
        }" version="1.1" xmlns="http://www.w3.org/2000/svg">
          <g transform="scale(${toString logoScale})">
            <g transform="matrix(.19936 0 0 .19936 80.161 27.828)">
              <path d="m-53.275 105.84-122.2-211.68 56.157-0.5268 32.624 56.869 32.856-56.565 27.902 0.011 14.291 24.69-46.81 80.49 33.229 57.826zm-142.26 92.748 244.42 0.012-27.622 48.897-65.562-0.1813 32.559 56.737-13.961 24.158-28.528 0.031-46.301-80.784-66.693-0.1359zm-9.3752-169.2-122.22 211.67-28.535-48.37 32.938-56.688-65.415-0.1717-13.942-24.169 14.237-24.721 93.111 0.2937 33.464-57.69z" fill="#${scheme.colors.base0C}"/>
              <path d="m-97.659 193.01 122.22-211.67 28.535 48.37-32.938 56.688 65.415 0.1716 13.941 24.169-14.237 24.721-93.111-0.2937-33.464 57.69zm-9.5985-169.65-244.42-0.012 27.622-48.897 65.562 0.1813-32.559-56.737 13.961-24.158 28.528-0.031 46.301 80.784 66.693 0.1359zm-141.76 93.224 122.2 211.68-56.157 0.5268-32.624-56.869-32.856 56.565-27.902-0.011-14.291-24.69 46.81-80.49-33.229-57.826z" fill="#${scheme.colors.base0D}" style="isolation:auto;mix-blend-mode:normal"/>
            </g>
          </g>
        </svg>
      </svg>
    '';
  };
  buildInputs = with pkgs; [ inkscape ];
  unpackPhase = "true";
  buildPhase = ''
    inkscape --export-type="png" $src -w ${toString width} -h ${
      toString height
    } -o wallpaper.png
  '';
  installPhase = "install -Dm0644 wallpaper.png $out";
}

A lib/vim-theme.nix => lib/vim-theme.nix +276 -0
@@ 0,0 1,276 @@
{ pkgs }: { scheme }:
let
  c = scheme.colors;
  slug = scheme.slug;
in
pkgs.writeTextDir "colors/nix-${slug}.vim" ''
  let g:colors_name="nix-${slug}"

  set termguicolors

  if exists("syntax_on")
    syntax reset
  endif

  hi clear

  hi Normal        guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
  hi Bold          guifg=NONE guibg=NONE gui=bold guisp=NONE
  hi Debug         guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi Directory     guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi Error         guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE
  hi ErrorMsg      guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
  hi Exception     guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi FoldColumn    guifg=#${c.base0C} guibg=#${c.base00} gui=NONE guisp=NONE
  hi Folded        guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE
  hi IncSearch     guifg=#${c.base01} guibg=#${c.base09} gui=NONE guisp=NONE
  hi Italic        guifg=NONE guibg=NONE gui=NONE guisp=NONE
  hi Macro         guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi MatchParen    guifg=NONE guibg=#${c.base03} gui=NONE guisp=NONE
  hi ModeMsg       guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
  hi MoreMsg       guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
  hi Question      guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi Search        guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE
  hi Substitute    guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE
  hi SpecialKey    guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
  hi TooLong       guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi Underlined    guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi Visual        guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
  hi VisualNOS     guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi WarningMsg    guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi WildMenu      guifg=#${c.base08} guibg=#${c.base0A} gui=NONE guisp=NONE
  hi Title         guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi Conceal       guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
  hi Cursor        guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE
  hi NonText       guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
  hi LineNr        guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE
  hi SignColumn    guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE
  hi StatusLine    guifg=#${c.base0B} guibg=#${c.base02} gui=NONE guisp=NONE
  hi StatusLineNC  guifg=#${c.base04} guibg=#${c.base01} gui=NONE guisp=NONE
  hi VertSplit     guifg=#${c.base01} guibg=#${c.base00} gui=NONE guisp=NONE
  hi ColorColumn   guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
  hi CursorColumn  guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
  hi CursorLine    guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
  hi CursorLineNr  guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE
  hi QuickFixLine  guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
  hi PMenu         guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE
  hi PMenuSel      guifg=#${c.base01} guibg=#${c.base05} gui=NONE guisp=NONE
  hi TabLine       guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE
  hi TabLineFill   guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE
  hi TabLineSel    guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE
  hi EndOfBuffer   guifg=#${c.base00} guibg=NONE gui=NONE guisp=NONE

  hi Boolean       guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi Character     guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi Comment       guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
  hi Conditional   guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi Constant      guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi Define        guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi Delimiter     guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
  hi Float         guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi Function      guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi Identifier    guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi Include       guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi Keyword       guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi Label         guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi Number        guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi Operator      guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi PreProc       guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi Repeat        guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi Special       guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
  hi SpecialChar   guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
  hi Statement     guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi StorageClass  guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi String        guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
  hi Structure     guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi Tag           guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi Todo          guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
  hi Type          guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi Typedef       guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE

  hi DiffAdd      guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
  hi DiffChange   guifg=#${c.base03} guibg=#${c.base00} gui=NONE guisp=NONE
  hi DiffDelete   guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
  hi DiffText     guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
  hi DiffAdded    guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
  hi DiffFile     guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
  hi DiffNewFile  guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
  hi DiffLine     guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
  hi DiffRemoved  guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE

  hi gitcommitOverflow       guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitSummary        guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitComment        guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitUntracked      guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitDiscarded      guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitSelected       guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitHeader         guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitSelectedType   guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitUnmergedType   guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitDiscardedType  guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitBranch         guifg=#${c.base09} guibg=NONE gui=bold guisp=NONE
  hi gitcommitUntrackedFile  guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi gitcommitUnmergedFile   guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE
  hi gitcommitDiscardedFile  guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE
  hi gitcommitSelectedFile   guifg=#${c.base0B} guibg=NONE gui=bold guisp=NONE

  hi GitGutterAdd           guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
  hi GitGutterChange        guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
  hi GitGutterDelete        guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
  hi GitGutterChangeDelete  guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE

  hi SpellBad    guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08}
  hi SpellLocal  guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C}
  hi SpellCap    guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0D}
  hi SpellRare   guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}

  hi DiagnosticError                     guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi DiagnosticWarn                      guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi DiagnosticInfo                      guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi DiagnosticHint                      guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
  hi DiagnosticUnderlineError            guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08}
  hi DiagnosticUnderlineWarning          guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}
  hi DiagnosticUnderlineWarn             guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}
  hi DiagnosticUnderlineInformation      guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0F}
  hi DiagnosticUnderlineHint             guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C}

  hi LspReferenceText                    guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
  hi LspReferenceRead                    guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
  hi LspReferenceWrite                   guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}

  hi link LspDiagnosticsDefaultError         DiagnosticError
  hi link LspDiagnosticsDefaultWarning       DiagnosticWarn
  hi link LspDiagnosticsDefaultInformation   DiagnosticInfo
  hi link LspDiagnosticsDefaultHint          DiagnosticHint
  hi link LspDiagnosticsUnderlineError       DiagnosticUnderlineError
  hi link LspDiagnosticsUnderlineWarning     DiagnosticUnderlineWarning
  hi link LspDiagnosticsUnderlineInformation DiagnosticUnderlineInformation
  hi link LspDiagnosticsUnderlineHint        DiagnosticUnderlineHint

  hi TSAnnotation          guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
  hi TSAttribute           guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi TSBoolean             guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi TSCharacter           guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi TSComment             guifg=#${c.base03} guibg=NONE gui=italic guisp=NONE
  hi TSConstructor         guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi TSConditional         guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi TSConstant            guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi TSConstBuiltin        guifg=#${c.base09} guibg=NONE gui=italic guisp=NONE
  hi TSConstMacro          guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi TSError               guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi TSException           guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi TSField               guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSFloat               guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi TSFunction            guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi TSFuncBuiltin         guifg=#${c.base0D} guibg=NONE gui=italic guisp=NONE
  hi TSFuncMacro           guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi TSInclude             guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi TSKeyword             guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi TSKeywordFunction     guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi TSKeywordOperator     guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
  hi TSLabel               guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi TSMethod              guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi TSNamespace           guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi TSNone                guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSNumber              guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi TSOperator            guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSParameter           guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSParameterReference  guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSProperty            guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSPunctDelimiter      guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
  hi TSPunctBracket        guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSPunctSpecial        guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSRepeat              guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi TSString              guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
  hi TSStringRegex         guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
  hi TSStringEscape        guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
  hi TSSymbol              guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
  hi TSTag                 guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi TSTagDelimiter        guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
  hi TSText                guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi TSStrong              guifg=NONE guibg=NONE gui=bold guisp=NONE
  hi TSEmphasis            guifg=#${c.base09} guibg=NONE gui=italic guisp=NONE
  hi TSUnderline           guifg=#${c.base00} guibg=NONE gui=underline guisp=NONE
  hi TSStrike              guifg=#${c.base00} guibg=NONE gui=strikethrough guisp=NONE
  hi TSTitle               guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
  hi TSLiteral             guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
  hi TSURI                 guifg=#${c.base09} guibg=NONE gui=underline guisp=NONE
  hi TSType                guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
  hi TSTypeBuiltin         guifg=#${c.base0A} guibg=NONE gui=italic guisp=NONE
  hi TSVariable            guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
  hi TSVariableBuiltin     guifg=#${c.base08} guibg=NONE gui=italic guisp=NONE

  hi TSDefinition          guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
  hi TSDefinitionUsage     guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
  hi TSCurrentScope        guifg=NONE guibg=NONE gui=bold guisp=NONE

  hi IndentBlankLine       guifg=#${c.base01} guibg=NONE gui=NONE guisp=NONE

  hi CmpItemAbbr            guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi CmpItemAbbrDeprecated  guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
  hi CmpItemAbbrMatch       guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi CmpItemAbbrMatchFuzzy  guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
  hi CmpItemKind            guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
  hi CmpItemMenu            guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE

  hi BufferCurrent         guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
  hi BufferCurrentIndex    guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
  hi BufferCurrentMod      guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE
  hi BufferCurrentSign     guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
  hi BufferCurrentTarget   guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
  hi BufferCurrentIcon     guifg=NONE guibg=#${c.base00} gui=NONE guisp=NONE
  hi BufferVisible         guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
  hi BufferVisibleIndex    guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
  hi BufferVisibleMod      guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE
  hi BufferVisibleSign     guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
  hi BufferVisibleTarget   guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE
  hi BufferVisibleIcon     guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
  hi BufferInactive        guifg=#${c.base04} guibg=#${c.base02} gui=NONE guisp=NONE
  hi BufferInactiveIndex   guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
  hi BufferInactiveMod     guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE
  hi BufferInactiveSign    guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
  hi BufferInactiveTarget  guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE
  hi BufferInactiveIcon    guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
  hi BufferTabpages        guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE
  hi BufferTabpageFill     guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE

  hi NvimInternalError  guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE

  hi NormalFloat   guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
  hi FloatBorder   guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
  hi NormalNC      guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
  hi TermCursor    guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE
  hi TermCursorNC  guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE

  hi User1  guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE
  hi User2  guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE
  hi User3  guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
  hi User4  guifg=#${c.base0C} guibg=#${c.base02} gui=NONE guisp=NONE
  hi User5  guifg=#${c.base01} guibg=#${c.base02} gui=NONE guisp=NONE
  hi User6  guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
  hi User7  guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
  hi User8  guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE
  hi User9  guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE

  hi TreesitterContext  guifg=NONE guibg=#${c.base01} gui=italic guisp=NONE

  let g:terminal_color_background = "#${c.base00}"
  let g:terminal_color_foreground = "#${c.base05}"

  let g:terminal_color_0  = "#${c.base00}"
  let g:terminal_color_1  = "#${c.base08}"
  let g:terminal_color_2  = "#${c.base0B}"
  let g:terminal_color_3  = "#${c.base0A}"
  let g:terminal_color_4  = "#${c.base0D}"
  let g:terminal_color_5  = "#${c.base0E}"
  let g:terminal_color_6  = "#${c.base0C}"
  let g:terminal_color_7  = "#${c.base05}"
  let g:terminal_color_8  = "#${c.base03}"
  let g:terminal_color_9  = "#${c.base08}"
  let g:terminal_color_10 = "#${c.base0B}"
  let g:terminal_color_11 = "#${c.base0A}"
  let g:terminal_color_12 = "#${c.base0D}"
  let g:terminal_color_13 = "#${c.base0E}"
  let g:terminal_color_14 = "#${c.base0C}"
  let g:terminal_color_15 = "#${c.base07}"
''