Mix two colors
mix_colorsBlend two colors at a chosen ratio and color space, such as OKLab or sRGB, to control midpoint brightness. Returns the mixed color and a CSS color-mix() expression.
Instructions
Mix two colors at a ratio in a chosen color space, like CSS color-mix(). OKLab keeps the middle bright, sRGB tends to turn gray. Returns the result and a ready color-mix() expression.
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": {
"first": "<first>",
"second": "<second>"
},
"name": "mix_colors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| first | Yes | Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500 | |
| space | No | oklab | |
| amount | No | Share of the second color in percent | |
| second | Yes | Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500 |