← Entwicklerwerkzeuge

Farbinformationen

GET /colors/:hex

Rufen Sie umfassende Informationen zu jeder Farbe anhand ihres Hex-Codes ab. Liefert die nächstliegende benannte Farbe, RGB-, HSL-, HSV- und CMYK-Werte, Kontrastvorschläge und eine Vorschaubild-URL. Nützlich für Design-Tools, Barrierefreiheits-Checker, die Farbkontrastdaten benötigen, Farbkonvertierungswerkzeuge und Bildungs-Apps, die Farbtheorie vermitteln.

Parameter

hex erforderlich

Hex color

Beispielanfragen

Grundlegende Verwendung
curl https://nordapi.ee/api/v1/colors/4287f5
Info about a blue color
curl https://nordapi.ee/api/v1/colors/4287f5
Info about pure red
curl https://nordapi.ee/api/v1/colors/ff0000
Info about a dark green
curl https://nordapi.ee/api/v1/colors/2ecc71

Live-Antwort

{
  "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
}