Make a CSS gradient
make_gradientBuild CSS gradients from 2+ colors using OKLab, OKLCH, or sRGB interpolation, returning modern CSS plus fallback stops. Use OKLab to avoid gray midpoints in sRGB gradients.
Instructions
Build a CSS gradient from 2 or more colors with interpolation in OKLab, OKLCH or sRGB. Returns modern CSS with the color space, a fallback with precomputed stops for older browsers, and the stop colors. OKLab avoids the gray middle that sRGB gradients get.
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>"
},
"name": "make_gradient"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | linear | |
| angle | No | Angle in degrees for linear | |
| space | No | oklab | |
| stops | No | How many precomputed stops the fallback gets | |
| colors | Yes | Gradient stops in order, 2 to 12 |