{"slug":"402utils-com-v1-color-93f669","title":"Colour utilities","host":"402utils.com","method":"GET","resource":"https://402utils.com/v1/color","category":"other","description":"Colour utilities: ?op=convert (default) turns any hex/rgb()/hsl()/CSS-name into hex, rgb, hsl, hsv, alpha, relative luminance and exact CSS name; ?op=contrast with ?fg=&bg= returns the WCAG 2.x contrast ratio and AA/AAA pass/fail for normal & large text plus UI components (accessibility / EAA); ?op=","price_listed":0.001,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":6,"reported_payers_30d":5,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"bg":"ffffff","fg":"000000","op":"contrast"},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET"],"type":"string"},"queryParams":{"description":"Query string only.","properties":{"bg":{"description":"Background colour (op=contrast). Falls back to `color` for fg.","type":"string"},"color":{"description":"The colour (convert/palette): hex without '#', rgb(), hsl() or a CSS name.","type":"string"},"fg":{"description":"Foreground colour (op=contrast).","type":"string"},"op":{"default":"convert","enum":["convert","contrast","palette"],"type":"string"}},"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"description":"Shape depends on `op`.","properties":{"AA":{"description":"AA pass/fail for normalText, largeText, uiComponents.","type":"object"},"AAA":{"description":"AAA pass/fail for normalText, largeText.","type":"object"},"analogous":{"items":{"type":"string"},"type":"array"},"complementary":{"description":"(op=palette).","type":"string"},"hex":{"type":"string"},"hsl":{"type":"object"},"hsv":{"type":"object"},"luminance":{"description":"WCAG relative luminance 0-1 (op=convert).","type":"number"},"name":{"description":"Exact CSS colour name, if any.","type":["string","null"]},"op":{"type":"string"},"ratio":{"description":"WCAG contrast ratio 1-21 (op=contrast).","type":"number"},"rgb":{"type":"object"},"shades":{"items":{"type":"string"},"type":"array"},"tints":{"items":{"type":"string"},"type":"array"},"triadic":{"items":{"type":"string"},"type":"array"}},"required":["op"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Colour utilities: ?op=convert (default) turns any hex/rgb()/hsl()/CSS-name into hex, rgb, hsl, hsv, alpha, relative luminance and exact CSS name; ?op=contrast with ?fg=&bg= returns the WCAG 2.x contrast ratio and AA/AAA pass/fail for normal & large text plus UI components (accessibility / EAA); ?op=palette derives complementary, analogous, triadic, tints and shades. Send hex without '#'.","last_updated":"2026-09-23T04:22:49.865Z","schemes":["exact"]}