hexcolors

Free color API

Static JSON files. No key, no signup, CORS enabled.

Color data

GET https://hexcolors.co/api/colors/{hex}.json

Example: /api/colors/1e90ff.json. Returns RGB, HSL, HSV, CMYK, LAB, the closest named color and contrast ratios against white and black. Available for every color that has a page on this site.

Named colors

GET https://hexcolors.co/api/names.json

All 148 CSS color names with their hex codes: /api/names.json.

Please be considerate with request volume and cache responses. Attribution with a link back is appreciated.