{"openapi":"3.1.0","info":{"title":"Color Distance API","version":"1.0.0","description":"CIE colour science as an API: convert colours through the device-independent spaces and measure how different two colours really look. The convert endpoint takes a colour as hex, RGB or CIELAB and returns it in sRGB hex, RGB, CIE XYZ and CIELAB (D65 white point). The distance endpoint computes the perceptual difference between two colours with all three standard Delta-E formulas — CIE76 (plain Lab distance), CIE94, and CIEDE2000, the modern and most accurate metric — and tells you whether the difference is perceptible. The nearest endpoint finds the closest named colour to any colour by CIEDE2000. This is the maths behind colour matching, print and brand-colour QC, and tolerancing — distinct from simple hex/RGB/HSL conversion. Everything is computed locally and deterministically, so it is instant and private. Ideal for print and prepress, brand-colour compliance, textile and paint matching, image processing and computer vision, and design tooling. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is CIE colour difference; for hex/RGB/HSL/CMYK conversion, palettes and WCAG contrast use a colour API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/colordelta-api","description":"oanor gateway"}],"tags":[{"name":"Color"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/convert":{"get":{"operationId":"get_v1_convert","tags":["Color"],"summary":"Convert hex/RGB/Lab","description":"","parameters":[{"name":"hex","in":"query","required":false,"description":"A hex colour","schema":{"type":"string"},"example":"#ff0000"},{"name":"rgb","in":"query","required":false,"description":"Or r,g,b","schema":{"type":"string"}},{"name":"lab","in":"query","required":false,"description":"Or L,a,b","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"hex":"#ff0000","lab":[53.2408,80.0925,67.2032],"rgb":[255,0,0],"xyz":[41.2456,21.2673,1.93339],"source":"hex"},"meta":{"timestamp":"2026-06-03T17:42:10.863Z","request_id":"c7190da6-7886-4d24-994b-f525d845f935"},"status":"ok","message":"Convert color","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/distance":{"get":{"operationId":"get_v1_distance","tags":["Color"],"summary":"Delta-E between two colours","description":"","parameters":[{"name":"a_hex","in":"query","required":false,"description":"First colour","schema":{"type":"string"},"example":"#ff0000"},{"name":"b_hex","in":"query","required":false,"description":"Second colour","schema":{"type":"string"},"example":"#ee0000"},{"name":"a_lab","in":"query","required":false,"description":"Or first as L,a,b","schema":{"type":"string"}},{"name":"b_lab","in":"query","required":false,"description":"Or second as L,a,b","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"delta_e_76":6.38049,"delta_e_94":3.64434,"color_a_lab":[53.2408,80.0925,67.2032],"color_b_lab":[49.7178,76.0173,63.7838],"perceptible":"yes (>1 just-noticeable difference)","delta_e_2000":3.62598},"meta":{"timestamp":"2026-06-03T17:42:10.968Z","request_id":"91da3b12-51cc-4e26-8360-4893fe05a705"},"status":"ok","message":"Color distance","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/nearest":{"get":{"operationId":"get_v1_nearest","tags":["Color"],"summary":"Nearest named colour","description":"","parameters":[{"name":"hex","in":"query","required":false,"description":"A colour","schema":{"type":"string"},"example":"#fe0102"},{"name":"rgb","in":"query","required":false,"description":"Or r,g,b","schema":{"type":"string"}},{"name":"lab","in":"query","required":false,"description":"Or L,a,b","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"lab":[53.0633,79.7986,66.5034],"nearest_hex":"#ff0000","delta_e_2000":0.266671,"nearest_name":"red"},"meta":{"timestamp":"2026-06-03T17:42:11.061Z","request_id":"a31e04c3-af66-40f7-b7c9-babb095a36b3"},"status":"ok","message":"Nearest named","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Color Distance API","notes":"sRGB, D65 white point. CIEDE2000 implemented per Sharma et al. A Delta-E of ~1 is the just-noticeable difference. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/convert","params":{"hex":"a hex colour","lab":"or L,a,b","rgb":"or r,g,b"},"returns":"the colour in hex, RGB, XYZ and Lab"},{"path":"/v1/distance","params":{"a_hex":"first colour (or a_rgb / a_lab)","b_hex":"second colour (or b_rgb / b_lab)"},"returns":"Delta-E 76, 94 and 2000"},{"path":"/v1/nearest","params":{"hex":"a colour (or rgb / lab)"},"returns":"the nearest named colour by CIEDE2000"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"CIE colour science as an API: convert colours through the device-independent spaces and measure how different two colours really look. The convert endpoint takes a colour as hex, RGB or CIELAB and returns it in sRGB hex, RGB, CIE XYZ and CIELAB (D65 white point). The distance endpoint computes the perceptual difference between two colours with all three standard Delta-E formulas — CIE76 (plain Lab distance), CIE94, and CIEDE2000 (the modern, most accurate metric) — and tells you whether the difference is perceptible. The nearest endpoint finds the closest named colour to any colour by CIEDE2000. This is the maths behind colour matching, print and brand-colour QC, and tolerancing — distinct from simple hex/RGB/HSL conversion. Everything is computed locally and deterministically, so it is instant and private. Ideal for print and prepress, brand-colour compliance, textile and paint matching, image processing, and design tooling. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is CIE colour difference; for hex/RGB/HSL/CMYK conversion, palettes and WCAG contrast use a colour API."},"meta":{"timestamp":"2026-06-03T17:42:11.159Z","request_id":"9ad17f32-ea60-41eb-be50-b13a26812037"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":6935,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":845,"monthly_call_quota":16450,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2835,"monthly_call_quota":215500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6635,"monthly_call_quota":1120000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/colordelta-api"}