Skip to content
onelayer.
All tools

Tool detail

color

Converts a hex or rgb() color to hex, RGB and HSL, plus approximate luminance and the better-contrast text color.

Categories: Utilities

Use when

  • convert a color between hex, RGB and HSL
  • check whether black or white text reads better on a given background color

Not for

  • not a full accessibility/WCAG contrast-ratio checker

Inputs

GET query param: color (string, required - hex #RGB/#RRGGBB or rgb(r,g,b))

Admitted input schema

{
  "type": "object",
  "properties": {
    "color": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "description": "Hex (#RGB/#RRGGBB) or rgb(r,g,b)"
    }
  },
  "required": [
    "color"
  ],
  "additionalProperties": false
}

Endpoint

Method
GET
URL
https://api.aventtech.com/convert/color

Payment

Protocol
x402
Listed price
0.01 USDC per call on Base
Payment method
exact
Network
eip155:8453
Asset
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Listed terms are catalog metadata. The caller supplies inputs and calls the tool outside Onelayer. If payment is required, the caller uses a compatible wallet to pay.

Source

Record
GET https://api.aventtech.com/convert/color
Retrieved
2026-09-30T20:37:07.382Z
Catalog file SHA-256
6837ccddf886f0007cf3727ea9d27faaa5047b51b4f425345c554ce1c271a524
Catalog built
2026-09-30T22:31:58.034Z