catppuccin-palette/porcelain.jq
2023-03-28 21:13:22 -04:00

10 lines
248 B
Text

map_values(map_values({
hex: .hex | ltrimstr("#"),
rgb: .raw | split(", ") | map(tonumber),
hsl: .hsl
| ltrimstr("hsl(")
| rtrimstr(")")
| split(", ")
| map(rtrimstr("%") | tonumber)
| [ .[0], .[1] / 100, .[2] / 100 ]
}))