Design
RGB <-> CIE-LCh API
Converts between sRGB/hex and CIE-LCh (cylindrical LAB: lightness, chroma, hue), both directions, exposing the LAB intermediate. Answers 'What is the LCh of this color?', 'How saturated (chroma) is it perceptually?'
Price$0.04per request
MethodPOST
Route/v1/design/lch-convert
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
colorlchcielchchromahuelabperceptualconvertdesign
API URL
Integration docshttps://x402.hexl.dev/v1/design/lch-convertExample request
{
"color": "#ff6347"
}Example response
{
"direction": "rgb->lch",
"input": "#ff6347",
"hex": "#ff6347",
"rgb": {
"r": 255,
"g": 99,
"b": 71
},
"hsl": {
"h": 9.13,
"s": 100,
"l": 63.92
},
"lab": {
"L": 62.207,
"a": 57.851,
"b": 46.42
},
"lch": {
"L": 62.207,
"c": 74.173,
"h": 38.744
}
}Input schema
{
"type": "object",
"properties": {
"color": {
"type": "string",
"examples": [
"#ff6347"
]
},
"lch": {
"type": "object",
"properties": {
"L": {
"type": "number"
},
"c": {
"type": "number"
},
"h": {
"type": "number"
}
}
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}