generate_gradient
Gradient Generator — Blend two or more colours into a PNG image. Unlike the web page, which writes a line of CSS, this produces a real picture a later step can composite or stamp on. [category: generate]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Out-of-range values are pulled back rather than refused. Width times height is also capped at 8 megapixels; over that, both sides shrink together and the shape is kept. | |
| colors | Yes | Two to sixteen colours, in order. Hex (#E05535, #E55, or with alpha #E05535FF) or a colour name. Fewer than two or more than sixteen is refused, not trimmed. | |
| format | No | PNG only. Any other value is refused. | png |
| height | No | Out-of-range values are pulled back rather than refused. See the note on width about the 8 megapixel cap. | |
| direction | No | Which way the blend runs: a CSS side or corner ('to right', 'to bottom left'), an explicit angle ('135deg', '-45'), 'radial' for a circular blend, or 'conic' for one that sweeps around. A direction we do not recognise is refused rather than quietly becoming top-to-bottom. | to right |
| positions | No | Where each colour sits along the blend, as a percentage from 0 to 100: one entry per colour, in the same order. Two colours at the same stop make a hard edge (0, 50, 50, 100). Leave it out and the colours are spaced evenly. A list without exactly one entry per colour is refused. |