df35c12c2f
* feat: add jq script for machine-readable palette * feat: add machine-readable palette * refactor: replace regex with jq filters * build: add porcelain step to `package.json` --------- Co-authored-by: winston <hey@winston.sh>
11 lines
248 B
Text
11 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 ]
|
|
}))
|