API & MCP

Everything a person can do on Palette Contrast Matrix, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Palette Contrast Matrix

Paste up to 24 opaque colors in HEX, GPL or JASC-PAL format. Compare every foreground and background pair, with exact ratios and AA, AAA and large-text results, then download a CSV report.

Inputs of Palette Contrast Matrix
FieldTypeDefaultDescription
colorstextarea"#164E63 #72A5A0 #ECF0DE"HEX, GPL or JASC-PAL palette

Example request

A three-color interface palette

curl -X POST https://luminapalettecontrast.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"colors":"#164E63 #72A5A0 #ECF0DE"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "lumina-palette-contrast": { "type": "http", "url": "https://luminapalettecontrast.usefulweb.site/mcp" }
  }
}