skills/color-cli/SKILL.md
[Hyper] Convert colors between hex, rgb, and oklch using @kood/color-cli. Use when the user asks to convert colors, transform CSS file colors, or needs accurate oklch values. Trigger phrases — "color convert", "hex to oklch", "oklch to hex", "rgb to oklch", "CSS color conversion", "color conversion", "tell me the oklch value".
npx skillsauth add alpoxdev/hypercore color-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Convert colors accurately between hex, rgb, and oklch using
@kood/color-cli.
<output_language>
Default all user-facing deliverables, saved artifacts, reports, plans, generated docs, summaries, handoff notes, commit/message drafts, and validation notes to Korean, even when this canonical skill file is written in English.
Preserve source code identifiers, CLI commands, file paths, schema keys, JSON/YAML field names, API names, package names, proper nouns, and quoted source excerpts in their required or original language.
Use a different language only when the user explicitly requests it, an existing target artifact must stay in another language for consistency, or a machine-readable contract requires exact English tokens. If a localized template or reference exists (for example *.ko.md or *.ko.json), prefer it for user-facing artifacts.
</output_language>
AI models often produce incorrect oklch conversions due to matrix precision errors, missing gamut mapping, and degree/radian confusion. This skill delegates color conversion to @kood/color-cli (powered by culori) for CSS Color Level 4 compliant results.
<request_routing>
</request_routing>
<prerequisites>Install @kood/color-cli globally if not already available:
npm i -g @kood/color-cli
Verify installation:
color --help
If color command is not found, install it first before proceeding.
When the user asks to convert a specific color value:
color "<value>"
Examples:
color "#ff0000"
color "oklch(0.7 0.25 140)"
color "rgb(255, 0, 0)"
color "hsl(0, 100%, 50%)"
For JSON output (useful for programmatic use):
color --json "#ff0000"
For multiple colors at once:
color "#e63946" "oklch(0.7 0.25 140)" "rgb(0, 128, 255)"
When the user wants to convert all colors in a CSS file to a specific format:
Preview first (dry run):
color css <file> --to <format> --dry-run
Apply changes (in-place):
color css <file> --to <format>
Supported target formats: hex, rgb, oklch.
Examples:
# Preview oklch conversion
color css styles.css --to oklch --dry-run
# Apply hex conversion
color css src/global.css --to hex
# Convert to rgb
color css theme.css --to rgb
rgba(255,0,0,0.5) → oklch(0.628 0.258 29.23 / 0.5))/* ... */)<output_interpretation>
HEX: #ff0000
RGB: rgb(255, 0, 0)
OKLCH: oklch(0.6280 0.2577 29.23)
When an oklch value is outside the sRGB gamut, the tool applies chroma-reduction and shows:
⚠ Color was outside sRGB gamut — CSS Color Level 4 chroma-reduction applied.
This means the original oklch chroma was reduced to fit sRGB while preserving lightness and hue.
styles.css: 12 colors found, 8 converted, 4 skipped
</output_interpretation>
<guidelines>--dry-run first when converting CSS files, then apply if the user confirms.development
[Hyper] Use when working on Vite + TanStack Router projects - enforces architecture rules (layers, routes, hooks, services, conventions) with mandatory validation before any code change. Triggers on file creation, route work, hook patterns, or any structural change in a Vite + TanStack Router codebase.
development
[Hyper] Update semantic versions across node/rust/python projects, keep discovered version files synchronized, and prefer the installed `git-commit` skill for the final git step with a direct fallback when it is unavailable.
development
[Hyper] Use when working on TanStack Start projects and the task involves auth, sessions, cookies, CSRF, secrets, env exposure, server functions/routes, headers/CSP, webhooks, or security review/fixes. Triggers on protecting routes, hardening auth flows, preventing secret leaks, securing server boundaries, or reviewing HTTP/security behavior in a TanStack Start app.
tools
[Hyper] Enforce TanStack Start architecture in existing Start projects, especially project/folder structure, route structure, nested shared folder organization, server functions, loader/client-server boundaries, importProtection, hooks, SSR/hydration, and hypercore conventions. Use before structural code changes, folder-structure reviews, route work, server function work, or architecture audits in TanStack Start codebases.