Luminance calcuation for block text?

Currently the block text color, no matter what, is white. This is fine for dark colored categories:

untitled script pic(9)

But is HORRIBLE for white-colored blocks:
untitled script pic(8)

What I propose is that instead of just using white, you can start with a Luminance calcuation (maybe add a option to change the type of calcuation), such as (0.299*R + 0.587*G + 0.114*B). Then, if that is over 0.5, use black. If not, use white. This will unlock a LOT MORE colors for libraries to use while still being visible.

I agree with this suggestion. It could also help with the black arrows, like on this block:
Tamagotchi script pic (11)
If using a black block, it will show up like this:
Tamagotchi script pic (10)

And one more, read-only dropdowns:
untitled script pic(10)

Because of zebra coloring, we recommend picking low-luminance colors as the main color for a block, which we lighten as the internal color. That's why the text is white on the main-color block and black on the zebra-colored block. Your suggestion would make sense if we darkened the zebra-color alternate for a high-luminance main-color block, but that would run the risk of confusion if the alternate color for one category looked like the main color of another category. But I don't know why the arrowheads aren't in the text color. :~) That just doesn't seem worth struggling about.

Bear in mind that the purpose of coloring block categories isn't aesthetic decoration, but rather conveying information. And we try to follow the guidelines for readability for color-blind users. But, speaking of aesthetics, I'm tempted to say that anyone who chooses white or black as a category color deserves whatever they get. :~P

I will also say, this is something we'll might be working on in the future to support color contrast accessibility. We can auto-detect white vs black text, but it gets complicated with zebra coloring and the standard luminance formulas have a lot of cases where the recommended color isn't great.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.