82trust / 100

Color

by Color Convert + Contrast in Documents & files

x402 APIPassing, checked 4 h ago

Parse any CSS color (hex, rgb(), hsl()) and emit all three formats plus relative luminance. Compute WCAG contrast ratios against a background with AA/AAA pass-fail for normal and large text, and lighten, darken, or mix colors. Built for agents generating accessible UI themes. POST a JSON body like: {"color":"#3498db","background":"#ffffff"}

POST https://keyronne.com/api/color

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
294 ms typical, 294 ms slowest 5%
Last check
4 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://keyronne.com/api/color" \
  -H "content-type: application/json" \
  -d '{"background":"#ffffff","color":"#3498db"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fkeyronne.com%2Fapi%2Fcolor
const res = await pay("https://keyronne.com/api/color", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"background":"#ffffff","color":"#3498db"}),
});
console.log(await res.json());

Example input

{
  "background": "#ffffff",
  "color": "#3498db"
}

Example output

{
  "contrast": {
    "against": "#ffffff",
    "largeTextAA": false,
    "normalTextAA": false,
    "ratio": 2.59
  },
  "hex": "#3498db",
  "hsl": {
    "h": 204,
    "l": 53.1,
    "s": 70
  },
  "input": "#3498db",
  "luminance": 0.2831,
  "rgb": {
    "a": 1,
    "b": 219,
    "g": 152,
    "r": 52
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed402294 ms$0.001