# Palette Contrast Matrix > Check every palette color pairing against WCAG text contrast thresholds. 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. Part of usefulweb.app (https://usefulweb.app/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://luminapalettecontrast.usefulweb.app/ (interactive tool at https://luminapalettecontrast.usefulweb.app/tool) - JSON API: POST https://luminapalettecontrast.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://luminapalettecontrast.usefulweb.app/api/v1/tool) - OpenAPI: https://luminapalettecontrast.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://luminapalettecontrast.usefulweb.app/mcp - tool `lumina_palette_contrast` ## Inputs - colors (textarea): HEX, GPL or JASC-PAL palette ## Method - Decode opaque sRGB channels to linear light using the 0.04045 breakpoint and calculate luminance with coefficients 0.2126, 0.7152 and 0.0722. - Contrast is (lighter luminance + 0.05)/(darker luminance + 0.05). Normal text AA needs 4.5:1 and AAA 7:1. Large text AA needs 3:1 and AAA 4.5:1. Threshold decisions use unrounded ratios. - Rows are foregrounds; columns are backgrounds. Identical-color pairs have ratio 1. Large text means at least 18 pt regular or 14 pt bold. Color-pair results do not certify a complete interface or text over photographs.