Colour maths
color_mathRead-only
Exact colour answers: WCAG contrast of two colours (and whether it passes for body and large text), the most readable text colour on a background, a 50-900 tint and shade scale of a colour, or a mix of two colours. ops runs several at once.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | contrast, readable, scale or mix. | |
| to | No | ||
| ops | No | Several operations, each {op, ...}; results come back in order. | |
| from | No | mix. | |
| color | No | scale: the colour at 500. | |
| pairs | No | contrast: [[foreground, background], ...] for several pairs. | |
| amount | No | mix: 0-1 of the way from `from` to `to`. | |
| intent | No | Optional: a few words on why. | |
| amounts | No | mix: several amounts, one colour each. | |
| background | No | contrast, readable. | |
| candidates | No | readable: colours to choose from (default black and white). | |
| foreground | No | contrast. |