{"openapi":"3.1.0","info":{"title":"Color Temperature API","version":"1.0.0","description":"Turn physical light into RGB colours — entirely locally. The kelvin endpoint converts a colour temperature in Kelvin into the RGB colour of a black body at that temperature: warm candle and incandescent tones below 3000 K, neutral and daylight whites around 5000–6500 K, and cool bluish light above, using Tanner Helland's widely-used approximation and returning hex, an rgb() string and a plain-English description (candlelight, warm white, neutral, daylight, cool). The wavelength endpoint converts a wavelength of visible light in nanometres (380–780 nm) into the approximate RGB colour the human eye perceives, with the natural intensity fall-off at the violet and red edges of the spectrum, and names the band (violet, blue, cyan, green, yellow, orange, red). Everything is computed locally and deterministically, so it is instant and private. Ideal for lighting and smart-bulb apps, photography and white-balance tools, data-visualisation of temperature or spectra, theming and UI accents, and science and education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. These are perceptual approximations, not colorimetric CIE conversions; for hex/RGB/HSL conversion and palettes use a colour API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/colortemp-api","description":"oanor gateway"}],"tags":[{"name":"Color Temp"},{"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/kelvin":{"get":{"operationId":"get_v1_kelvin","tags":["Color Temp"],"summary":"Kelvin to RGB","description":"","parameters":[{"name":"kelvin","in":"query","required":true,"description":"Colour temperature in K (1000–40000)","schema":{"type":"string"},"example":"2700"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"css":"rgb(255, 167, 87)","hex":"#ffa757","rgb":{"b":87,"g":167,"r":255},"kelvin":2700,"description":"warm white (incandescent)"},"meta":{"timestamp":"2026-06-03T09:25:00.119Z","request_id":"9da7d942-55ba-44a4-a787-6f2039507e5d"},"status":"ok","message":"Kelvin to RGB","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/wavelength":{"get":{"operationId":"get_v1_wavelength","tags":["Color Temp"],"summary":"Wavelength to RGB","description":"","parameters":[{"name":"nm","in":"query","required":true,"description":"Wavelength in nanometres (380–780)","schema":{"type":"string"},"example":"650"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"nm":650,"css":"rgb(255, 0, 0)","hex":"#ff0000","rgb":{"b":0,"g":0,"r":255},"band":"red","visible":true},"meta":{"timestamp":"2026-06-03T09:25:00.228Z","request_id":"8ec61c49-83d2-4626-9f7b-7966ff5921b8"},"status":"ok","message":"Wavelength to RGB","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 Temperature API","notes":"Kelvin uses the Tanner Helland black-body approximation; wavelength uses the Dan Bruton visible-spectrum approximation — both are perceptual approximations, not colorimetric (CIE) conversions. For format conversion (hex/RGB/HSL) and palettes use a colour API. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/kelvin","params":{"kelvin":"colour temperature in K (1000–40000)"},"returns":"the RGB/hex colour and a description (warm/neutral/cool)"},{"path":"/v1/wavelength","params":{"nm":"wavelength in nanometres (380–780)"},"returns":"the approximate RGB/hex colour and the spectral band"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Turn physical light into RGB colours. The kelvin endpoint converts a colour temperature in Kelvin into the RGB colour of a black body at that temperature — warm candle and incandescent tones below 3000 K, neutral and daylight whites around 5000–6500 K, and cool bluish light above — using Tanner Helland's well-known approximation, with a plain-English description. The wavelength endpoint converts a wavelength of visible light in nanometres (380–780 nm) into the approximate RGB colour the eye perceives, with the natural intensity fall-off at the edges of the spectrum, and names the band (violet, blue, green, yellow, orange, red). Pure local, no key."},"meta":{"timestamp":"2026-06-03T09:25:00.315Z","request_id":"3596f300-b8eb-48ca-9e99-7d921426e3b0"},"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":3535,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":505,"monthly_call_quota":13050,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2495,"monthly_call_quota":181500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6295,"monthly_call_quota":950000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/colortemp-api"}