
CoCo
Convert colors between HEX, HSL, and OKLCH — in selection or entire file.
Features
- One command:
CoCo: Convert Colors — opens a picker with available conversions
- Auto-detects which color formats are present — only shows relevant options
- Supported formats: HEX(A), HSL(A), OKLCH(A)
- Reads both legacy (
hsl(120, 100%, 50%)) and modern (hsl(120 100% 50%)) CSS syntax
- Writes modern CSS syntax only
- Smart output: alpha included only when non-opaque; hex uses shortest form (
#fff over #ffffff)
Usage
- Select text containing colors (or leave empty to process entire file)
- Open Command Palette →
CoCo: Convert Colors
- Pick a conversion (e.g.
HEX → OKLCH)
License
MIT
| |