feat: add jq script for machine-readable palette
This commit is contained in:
parent
530db7cbcb
commit
7e5d18a69f
1 changed files with 8 additions and 0 deletions
8
porcelain.jq
Normal file
8
porcelain.jq
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
map_values(map_values({
|
||||||
|
hex: .hex | ltrimstr("#"),
|
||||||
|
rgb: .raw | split(", ") | map(tonumber),
|
||||||
|
hsl: .hsl
|
||||||
|
| capture("hsl\\((?<h>\\d+),\\s*(?<s>\\d+)%,\\s*(?<l>\\d+)%\\)")
|
||||||
|
| map(tonumber)
|
||||||
|
| [ .[0], .[1] / 100, .[2] / 100 ]
|
||||||
|
}))
|
Loading…
Reference in a new issue