Generate Smooth Gradient
generate_gradientBuild a 2–5 color OKLab gradient that avoids muddy midpoints, returning CSS with fallback and modern in oklab plus readable text color guidance.
Instructions
Build a smooth gradient from 2 to 5 colors, interpolated in OKLab so the middle never turns muddy. Returns CSS with a fallback plus a modern in oklab version, and tells you whether white or black text stays readable across the whole gradient. Deterministic, no API key needed.
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": "generate_gradient"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | linear | |
| angle | No | ||
| colors | Yes | ||
| smoothness | No | Extra stops between colors |