Navigation Menu

Skip to content

Releases: devinmcgloin/clr

Fixed implementation of color.Color interface

27 May 18:30
Compare
Choose a tag to compare
v1.0.1

Fixed implemation of color.Color

Initial Release

27 May 17:19
Compare
Choose a tag to compare

clr is a go library to manage different color spaces, convert between them and compare colors.

clr currently supports sRGB HSV, and Hex types, with conversions to sRGB, Hex, HSV, HSL, CMYK, XYZ and CIE-Lab for each.

Comparisons are done in CIE-Lab using Delta E*. I may add more comparison options in the future, but for now Delta E* performs well enough.

Given a mapping from Hex to color names you can find the nearest color visually in the mapping from any given color. Data for these mappings is up to you to provide by implementing ColorTable.