Catalog/design-hsv-convert

Design

RGB <-> HSV/HSB API

Converts between sRGB/hex and HSV/HSB (hue, saturation, value/brightness), both directions, plus the HSL view. Answers 'What is the HSV/HSB of this color?', 'Convert HSB back to a hex color.'

Price$0.02per request
MethodPOST
Route/v1/design/hsv-convert
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
colorhsvhsbhuesaturationbrightnessconvertdesigncolorspace
API URLhttps://x402.hexl.dev/v1/design/hsv-convert
Integration docs
Example request
{
  "color": "#ff6347"
}
Example response
{
  "direction": "rgb->hsv",
  "input": "#ff6347",
  "hex": "#ff6347",
  "rgb": {
    "r": 255,
    "g": 99,
    "b": 71
  },
  "hsl": {
    "h": 9.13,
    "s": 100,
    "l": 63.92
  },
  "hsv": {
    "h": 9.13,
    "s": 72.16,
    "v": 100
  },
  "css": "hsv(9.13, 72.16%, 100%)"
}
Input schema
{
  "type": "object",
  "properties": {
    "color": {
      "type": "string",
      "examples": [
        "#ff6347"
      ]
    },
    "hsv": {
      "type": "object",
      "properties": {
        "h": {
          "type": "number"
        },
        "s": {
          "type": "number"
        },
        "v": {
          "type": "number"
        }
      }
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}