Convertir formatos de color
color-convertConvierte colores CSS (hex, rgb, hsl, hwb, oklch, oklab, nombres) a hex, RGB, HSL, HSV, CMYK, OKLab, OKLCH y CIELAB. Cuándo: hay que calcular con exactitud colores, contrastes o paletas, p. ej. para revisar accesibilidad. No para: generar paletas armónicas desde un color base (color-palette). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Parses any common CSS color (hex 3/4/6/8, rgb(), hsl(), hwb(), oklch(), oklab(), 148 named colors) and returns hex, RGB, HSL, HSV, CMYK (naive), OKLab, OKLCH and CIELAB (D65). Out-of-gamut OKLCH is chroma-reduced into sRGB. When: color values, contrast or palettes have to be computed exactly, e.g. for accessibility checks. Not for: generating harmony palettes from a base color by rotating OKLCH hue (color-palette). [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | CSS color: hex, rgb(), hsl(), hwb(), oklch(), oklab() or a named color (string; required; up to 100 chars). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hex | No | ||
| hsl | No | ||
| hsv | No | ||
| lab | No | ||
| rgb | No | ||
| cmyk | No | ||
| alpha | No | ||
| oklab | No | ||
| oklch | No | ||
| css_hsl | No | ||
| css_rgb | No | ||
| css_oklch | No |