{inputs, ...}: let
  inherit (inputs.nixpkgs.lib) toHexString concatStrings strings;
  inherit (strings) fixedWidthString;

  padHex = n: fixedWidthString 2 "0" (toHexString n);
in {
  toHex = color: concatStrings ["#" (padHex color.red) (padHex color.green) (padHex color.blue)];
  toHexNoHash = color: concatStrings [(padHex color.red) (padHex color.green) (padHex color.blue)];
  toRGB = color: concatStrings ["rgb(" (toString color.red) "," (toString color.green) "," (toString color.blue) ")"];
  toRGBA = color: a: concatStrings ["rgba(" (toString color.red) "," (toString color.green) "," (toString color.blue) "," (toString a) ")"];
}
