Skip to content
Fourohtwo

Convert a colour between hex, rgb, hsl, hsv and cmyk (input

agents.204-168-199-108.sslip.io/v1/util/color

Convert a colour between hex, rgb, hsl, hsv and cmyk (input: hex, rgb(), hsl() or a CSS colour name), get relative luminance, dark/light, and whether black or white text reads better on it. With 'against', returns the WCAG 2.x contrast ratio and pass/fail for AA/AAA normal and large text and UI components. Use for accessible UI, theme generation, brand colour checks.

BaseSolanaaws:baseAnswering
GEThttps://agents.204-168-199-108.sslip.io/v1/util/color

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.204-168-199-108.sslip.io/v1/util/color?against=white&color=%231a73e8");
console.log(await res.json());

Example input

{
  "against": "white",
  "color": "#1a73e8"
}