cURL
curl --request POST \ --url https://api.dirtroad.dev/tools/color-converter/rgb-to-hex \ --header 'Content-Type: application/json' \ --header 'X-Payment: <api-key>' \ --data ' { "r": 255, "g": 0, "b": 0 } '
{ "original": { "r": 123, "g": 123, "b": 123 }, "result": "#FF0000" }
Convert RGB values to a hex color code. Requires x402 blockchain payment.
x402 blockchain payment authorization header containing signed EIP-3009 Transfer with Authorization
Red component
0 <= x <= 255
255
Green component
0
Blue component
RGB values converted to hex color code
Show child attributes
Hex color code
"#FF0000"