Skip to content
Edera Artware

API

The whole atlas as JSON. No key, no sign-up, Access-Control-Allow-Origin: *, so it can be read from a browser, a plugin or a script. Give it an EDEC code and it gives back the colour with every value the book prints.

Try it

https://edera.pro/atlas/api/color/32k00

{
    "series": "edera-atlas",
    "version": "2",
    "api": "1",
    "docs": "https://edera.pro/atlas/api",
    "color": {
        "code": "32K00",
        "code_full": "32K0051KRW",
        "hex": "#1A292D",
        "rgb": [
            26,
            41,
            45
        ],
        "cmyk": [
            42,
            9,
            0,
            82
        ],
        "hsl": [
            193,
            27,
            14
        ],
        "lab": [
            15.5,
            -5.2,
            -4.8
        ],
        "lch": [
            15.5,
            7.08,
            222.71
        ],
        "hue": 222.7,
        "chroma": 7.1,
        "sector": "H",
        "band": "shadow",
        "band_name": "Shadow",
        "role": "further accent",
        "role_name": "further accent",
        "name": "black",
        "coverage": 0.55,
        "ink": "light",
        "plate": {
            "slug": "srl",
            "code": "SRL",
            "title": "Paseo a orillas del mar",
            "title_en": "Strolling along the seashore",
            "artist": "Joaquin Sorolla",
            "year": "1909",
            "url": "https://edera.pro/atlas/srl"
        },
        "url": "https://edera.pro/atlas/32k00",
        "image": "https://edera.pro/atlas/og/32k00.png"
    }
}

Endpoints

All of them answer GET and OPTIONS, always as application/json; charset=utf-8. Base: https://edera.pro/atlas/api

GET /api/color/{code}

One colour by its EDEC code. Any unambiguous prefix of the full code works, exactly like the web address https://edera.pro/atlas/{code}. An ambiguous prefix answers 404 with the candidates.

https://edera.pro/atlas/api/color/32k00

The colour object

What /api/color/{code}, /api/colors, /api/nearest and /api/plate/{slug} return for each colour.

FieldTypeMeaning
codestringThe EDEC code as printed, upper case.
code_fullstringThe long code the short one abbreviates. The short one is a prefix of it.
hexstringsRGB, #RRGGBB, upper case.
rgbint[3]0–255.
cmykfloat[4]Percentages, the ones printed in the book.
hslfloat[3]Hue 0–360, saturation and lightness 0–100.
labfloat[3]CIE L*a*b*, D65.
lchfloat[3]Lightness, chroma, hue from Lab.
huefloatLCh hue, degrees.
chromafloatLCh chroma.
sectorstringHue sector A–L, thirty degrees each.
bandstringOne of shadow, half-shadow, midtone, light.
band_namestringThe band label as shown on the site.
rolestringThe role the colour plays in its painting, when measured.
namestringThe colour family word: red, ochre, olive, grey…
coveragefloatPercentage of the painting this colour covers.
inkstringdark or light: which ink reads on top of this colour.
plateobjectslug, code, title, title_en, artist, year, url of the plate it was measured on.
urlstringThe colour page, the address printed in the book.
imagestringA 1200×630 PNG of the colour, for previews.

From code

Browser or Node:

const r = await fetch('https://edera.pro/atlas/api/color/32k00');
const { color } = await r.json();
console.log(color.hex, color.lab, color.plate.title);

Shell:

curl -s 'https://edera.pro/atlas/api/nearest?hex=1A292D&n=3' | jq '.colors[] | {code, hex, delta}'

Python:

import json, urllib.request
with urllib.request.urlopen('https://edera.pro/atlas/api/colors?codes=32k00') as r:
    for c in json.load(r)['colors']:
        print(c['code'], c['hex'], c['name'])

Errors and limits

Errors are JSON too: {"error": "color_not_found"} with status 404, ambiguous_code with the candidates, invalid_hex, missing_codes or too_many_codes with status 400. Responses are cacheable (an hour, the catalogue a day); please cache them on your side. Files for design tools —ASE, ACO, GPL, SVG, CSS, JSON— hang off each plate: https://edera.pro/atlas/srl.ase.

The colours are measured on paintings in the public domain and are free to use. A link back to the colour page is welcome. Version 2 of the catalogue, API v1.