Adjust colors
colors_adjustAdjust CSS colors' lightness, chroma, or hue by exact OKLCH amounts, returning valid sRGB hex values and lowering chroma automatically when a color leaves the gamut.
Instructions
Make colors lighter, darker, more or less colorful, or rotate the hue, by exact OKLCH amounts. Changes only the property you name; the result is always a valid sRGB hex (chroma is lowered if the color would leave the gamut). Examples: {property:"lightness",mode:"add",amount:-0.1}; {property:"hue",mode:"add",amount:40}; {property:"chroma",mode:"multiply",amount:0.6}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"colors": "<colors>",
"property": "<property>",
"amount": "<amount>"
},
"name": "colors_adjust"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "add" the amount (negative lowers it), "multiply" by the amount (0.5 halves chroma), or "set" the property to the amount. Default "add". | add |
| amount | Yes | The number to add, multiply by, or set. Lightness and chroma are on the OKLCH scale (add -0.1 lightness = a bit darker); hue is in degrees. | |
| colors | Yes | Colors to adjust. A list, even for a single color. Any CSS color strings. | |
| property | Yes | What to change, in OKLCH: lightness (0 black to 1 white), chroma (colorfulness, about 0 to 0.4), or hue (degrees, 0 to 360). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes |