pkgs: rec {

  lib = import ../nxlib/ricelib.nix pkgs.lib;

  transparency = 0.8;
  rounding = 10;
  gap-size = 10;
  border-width = 3;
  color =
    let
      dark = (-0.5);
      bright = (0.5);  
      alter-set = let f = lib.alter-luminace-hex; in color-name: color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
      alter     = let f = lib.alter-luminace-hex; in             color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
      # ccolor = builtins.mapAttrs alter-set (builtins.fromJSON (builtins.readFile ./colors.json));
      ccolor = builtins.mapAttrs alter-set {
        black =   "#111111"; # "#111111" "#001100";
        white =   "#dddddd"; # "#dddddd" "#66dd66";
        blue =    "#4444dd"; # "#3333dd" "#003300";
        cyan =    "#44dddd"; # "#11dddd" "#00dd55";
        green =   "#44dd44"; # "#11dd11" "#11dd11";
        magenta = "#dd44dd"; # "#dd11dd" "#005500";
        red =     "#dd4444"; # "#dd1111" "#00aa00";
        yellow =  "#dd4444"; # "#dddd11" "#ffff00";
      };
      facolor = builtins.mapAttrs alter-set (builtins.fromJSON (builtins.readFile ./colors.json)).to_alter;
      fbcolor =                             (builtins.fromJSON (builtins.readFile ./colors.json)).base;
      fcolor = facolor // fbcolor;
      xcolor = with ccolor; with fcolor; rec {
        background = "#000000";
        # foreground = "#dddddd";
        # accent = blue;
        # secondary = cyan;
        # tertiary = magenta;
        # special = yellow;
        # weird = green;
        positive = alter "#00dd00";
        negative = alter "#dd0000";
        border = accent.base;
        border2 = secondary.base;
      };
    in ccolor // fcolor // xcolor; 
  font = {
    code = {
      name = "JetBrainsMono-NF";
      name2 = "JetBrainsMono Nerd Font";
      package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
      # name = "CascadiaCove-NF";
      # package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; });
    };
    base = {
      # name = "NewComputerModern08";
      # package = pkgs.newcomputermodern;
      name = "Atkinson Hyperlegible";
      package = pkgs.atkinson-hyperlegible;
    };
  };
  cursor = {
    name = "Bibata-Original-Classic";
    package = pkgs.bibata-cursors;
    size = 24;
  };
}
