diff --git a/porcelain.jq b/porcelain.jq index c0df9a7..bbe0f4e 100644 --- a/porcelain.jq +++ b/porcelain.jq @@ -2,7 +2,9 @@ map_values(map_values({ hex: .hex | ltrimstr("#"), rgb: .raw | split(", ") | map(tonumber), hsl: .hsl - | capture("hsl\\((?\\d+),\\s*(?\\d+)%,\\s*(?\\d+)%\\)") - | map(tonumber) + | ltrimstr("hsl(") + | rtrimstr(")") + | split(", ") + | map(rtrimstr("%") | tonumber) | [ .[0], .[1] / 100, .[2] / 100 ] }))