SlexAxton / css-colorguard

Keep a watchful eye on your css colors.
2.44k stars 65 forks source link

False collisions with gradiated color scheme #57

Open joefiorini opened 6 years ago

joefiorini commented 6 years ago

We have an app that uses hsl and postcss-color-mod to define custom properties with varying lightnesses of our brand colors. I was hoping to use this library to detect duplications of these colors, but it seems that all of the hsl values conflict with each other (ie. a bunch of hsl(197.8, 100%, 74%) collides with hsl(197.8, 100%, 69%) warnings in the file that defines the color scheme properties. It would be nice if there was a way to ignore these. I tried to put a couple of them in the whitelist but that didn't work. The only way was to bump the tolerance up to 75, but that seems a bit nuts. Anyone dealt with this before? Thoughts on getting past it?