davidmerfield/randomColor

Light colors not light enough ?

Closed this issue · 4 comments

Hello. Thanks for your lib !

I'm using it for generating colors in a bookmark minisite (open source)

capture d ecran 2017-03-17 a 15 56 02

As you can see, random colors generated with luminosity "light" are not always contrasting well with a black text for the "blue" hue (it's even worse with purple, so I don't use it).

I'm expecting "light" colors to contrast well with a dark color. Could this be an improvement ? Or am I assuming wrong ?

Hi! I can understand why you might want brighter colors in your case. For your project, consider making a modification to the brightness function here:

https://github.com/davidmerfield/randomColor/blob/master/randomColor.js#L156

I'm closing this for now. Please let me know if you have any other questions.

Well, I was just wondering if the brightness function was correct. The "light" colours it produces don't seem that "light" to me. But your call!

Eh, I'd consider them light enough for now but I'd be happy to consider an improvment.

@davidmerfield just look at the backgrounds on the screenshot above. The colors are generated with the "light" option.