Color convert
Try it interactively →POST /api/color-convertParse a colour in any common notation (hex, rgb, hsl, hsv, CSS-named) and emit it in every other form. Reports brightness and dark/light flags for accessible-contrast decisions.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| input* | string | — | Color in any notation. |
Response
Modes: json. Cache: yes (24h TTL).
Code samples
Built from the tomato example.
curl -X POST https://api.xtract.bot/api/color-convert \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"input": "tomato"
}'