Skip to main content
Glama

ContrastKit

Convert a CSS color

convert_color
Read-onlyIdempotent

Convert a CSS color to hex, rgb() and hsl(), with its relative luminance, its contrast on white and on black, and the better text color (black or white) to put on it. Read-only. Same engine as GET /api/convert.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYesColor as a CSS color: "#1a73e8", "#fff", "rgb(26 115 232)", "hsl(217 80% 51%)", "rgba(0,0,0,.6)" or a name like "navy".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hexYes
hslNo
rgbNo
alphaNo
inputNo
versionYes
luminanceYes
bestTextColorYes
contrastOnBlackNo
contrastOnWhiteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources