nixos-icons: pad hex color values with leading zeros (#1584)
Closes: https://github.com/nix-community/stylix/issues/1581 Link: https://github.com/nix-community/stylix/pull/1584 Reviewed-by: Daniel Thwaites <danth@danth.me> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
3c73dee2db
commit
825d79112f
1 changed files with 3 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
inherit (oldAttrs) src;
|
||||
prePatch =
|
||||
let
|
||||
inherit (builtins) stringLength;
|
||||
inherit (config.lib.stylix) colors;
|
||||
|
||||
inherit (lib)
|
||||
|
|
@ -46,6 +47,8 @@
|
|||
(map (max 0))
|
||||
# convert each to hex string
|
||||
(map toHexString)
|
||||
# add leading 0 if necessary
|
||||
(map (hex: if (stringLength hex < 2) then "0" + hex else hex))
|
||||
# to one string
|
||||
concatStrings
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue