GET /colors/:hex
Get comprehensive information about any color by its hex code. Returns the closest named color, RGB, HSL, HSV, and CMYK values, contrast suggestions, and a preview image URL. Useful for design tools, accessibility checkers that need color contrast data, color conversion utilities, and educational apps teaching color theory.
hex
required
Hex color
| Name | Required | Default | Description |
|---|---|---|---|
hex |
Yes | - | Hex color |
curl https://nordapi.ee/api/v1/colors/4287f5
curl https://nordapi.ee/api/v1/colors/4287f5
curl https://nordapi.ee/api/v1/colors/ff0000
curl https://nordapi.ee/api/v1/colors/2ecc71
{
"data": {
"cmyk": "cmyk(73, 45, 0, 4)",
"contrast": "#000000",
"exact_match": false,
"hex": "#4287F5",
"hsl": "hsl(217, 90%, 61%)",
"hsv": "hsv(217, 73%, 96%)",
"image": "https://www.thecolorapi.com/id?format=svg&named=false&hex=4287F5",
"image_named": "https://www.thecolorapi.com/id?format=svg&hex=4287F5",
"name": "Blueberry",
"rgb": "rgb(66, 135, 245)"
},
"success": true
}