ramp_between
Build a color ramp between two chosen endpoint colors, interpolating middle steps and preserving both endpoints exactly.
Instructions
Build a ramp from its two ends, which is how a ramp is usually decided.
`generate_ramp` grows a ramp outward from one base colour, so reaching a particular
shadow and a particular highlight means guessing at `hue_shift` until the ends land
near what was wanted. This takes the ends directly: pick the cool shadow and the warm
highlight, and the middle is interpolated between them.
Both ends come back **exactly** as given. They were chosen, and a ramp whose endpoints
are approximations of the caller's own colours is not the ramp that was asked for.
Args:
easing: "perceptual" (the default) walks the straight line between the ends in
Oklab, so the middle steps are evenly spaced to the eye and the ramp keeps its
hue. "linear" is the naive sRGB blend, which darkens and greys the middle.
filename, apply: As `generate_ramp`. "append" or "replace" writes the ramp into
that sprite's palette.
Neither mode rotates hue. Interpolating hue between distant colours is what turns a
blue-to-cream ramp magenta in the middle: at that distance both ways round the wheel
are equally short, and neither is the blend anybody wanted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | Default: "none". | none |
| steps | No | Default: 5. | |
| easing | No | Default: "perceptual". | perceptual |
| filename | No | ||
| light_color | Yes | ||
| shadow_color | Yes |