cURL
curl --request POST \ --url https://api.dirtroad.dev/tools/color-converter/hex-to-hsl \ --header 'Content-Type: application/json' \ --header 'X-Payment: <api-key>' \ --data ' { "hex": "#FF0000" } '
{ "original": "<string>", "result": { "h": 180, "s": 50, "l": 50 } }
Convert a hex color code to HSL values. Requires x402 blockchain payment.
x402 blockchain payment authorization header containing signed EIP-3009 Transfer with Authorization
Hex color code (with or without # prefix)
"#FF0000"
Hex color converted to HSL values
Original hex color input
Show child attributes