convert_color
Convert any CSS color string to canonical hex, rgb, hsl, or oklch format. Provide input color and target format to get standardized output.
Instructions
Convert a CSS color string into a canonical hex, rgb, hsl, or oklch format string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target color format to convert the input into | |
| input | Yes | CSS color string to convert, e.g. "#ff0000", "tomato" (max 256 chars) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | The input color formatted in the requested target format (oklch is raw/lossless; hex/rgb/hsl are sRGB-clamped for out-of-gamut inputs) |