Aclarar, oscurecer o saturar color
color-adjustAjusta un color en OKLCH: luminosidad, croma (saturación) y tono, o transparencia. Cuándo: hay que calcular con exactitud colores, contrastes o paletas, p. ej. para revisar accesibilidad. No para: encontrar el color más cercano (color-contrast-fix). 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: Adjusts a color in OKLCH: change lightness, chroma (saturation) and hue by deltas, or set alpha; results are mapped back into the sRGB gamut. When: color values, contrast or palettes have to be computed exactly, e.g. for accessibility checks. Not for: finding the closest color to a foreground (color-contrast-fix). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hue | No | Hue rotation in degrees (number; optional; default 0; min -360; max 360). | |
| alpha | No | Set alpha 0-1 (number; optional; min 0; max 1). | |
| color | Yes | CSS color: hex, rgb(), hsl(), hwb(), oklch(), oklab() or a named color (string; required; up to 100 chars). | |
| chroma | No | Chroma delta (-0.4..0.4) (number; optional; default 0; min -0.4; max 0.4). | |
| lightness | No | Lightness delta (-1..1) (number; optional; default 0; min -1; max 1). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No |