Skip to content

Conversation

@qix
Copy link

@qix qix commented Jan 23, 2012

Deciding whether to use white/black text on top of a given background color is much better decided using the backgrounds "luma" rather than "lightness". Luma is a better measure of the intensity of the light, since it differentiates between colors that we do not see as well (30% red, 59% green, 11% blue).

@sanford
Copy link

sanford commented Mar 11, 2012

+1 would love to see this get added

@Synchro
Copy link
Member

Synchro commented Mar 23, 2012

Yes! This would be perfect to use with my #730 contrast function, which does indeed use lightness for this exact purpose.

Edit: I did't see your code attached, duh, sorry.

@Synchro Synchro mentioned this pull request Mar 23, 2012
@lukeapage
Copy link
Member

A different implementation of luma has been added.

@lukeapage lukeapage closed this Aug 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants