diff options
| author | delta <darkussdelta@gmail.com> | 2026-01-27 04:18:15 +0100 |
|---|---|---|
| committer | delta <darkussdelta@gmail.com> | 2026-01-27 04:18:15 +0100 |
| commit | 3026a05a2a2be91aa160de230a838acd5c2b3536 (patch) | |
| tree | 141ea424f7c4149c27e6749a73fec7dd4fd354ab /.zs/components/colors.jq | |
| parent | ce0a6c0388b4684d8f15a7ff1049e42e2d8cc63c (diff) | |
Diffstat (limited to '.zs/components/colors.jq')
| -rw-r--r-- | .zs/components/colors.jq | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.zs/components/colors.jq b/.zs/components/colors.jq new file mode 100644 index 0000000..1b007cd --- /dev/null +++ b/.zs/components/colors.jq @@ -0,0 +1,10 @@ +to_entries | +map([ + (.key | gsub("_"; "-")), + ("oklch(" + (.value | join(" ")) + ")") +]) | +# group_by(.[0] | gsub("-.*"; "")) | +reduce .[] as $item ([]; .[if ($item[0] | test("fg|bg|border")) then 0 else 1 end] += [$item]) | +map(reduce .[] as $item ({}; .[$item[0] | gsub("-.*"; "")] += [$item])) | +map(map(map("<li style=\"background-color: var(--\(.[0]))\"\(if (.[0] | test("bg|border")) then " class=\"fg-light\"" else "" end)><div class=\"color_name\">\(.[0])</div><div class=\"color_value\">\(.[1])</div></li>") | "<ol>" + join("") + "</ol>") | "<div>" + join("") + "</div>" ) | +join("\n") |
