google / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
12.42k stars 3.71k forks source link

Label fields should be non-white for white/light colored blocks #1640

Open AnmAtAnm opened 6 years ago

AnmAtAnm commented 6 years ago

Problem statement

Labels always have white text, so they are not readable on white (or even light) colored blocks.

screen shot 2018-02-20 at 10 45 31 am

Expected Behavior

FieldLabel colors should adjust based on the block color, ensure sufficient contrast on light color blocks.

Actual Behavior

White text is unreadable.

Steps to Reproduce

See the white block in the playground test blocks, "Styles" category.

harsh-chaturvedi commented 2 years ago

@AnmAtAnm did you figure out a way to do this?

alschmiedt commented 2 years ago

We have a way to change the text color on all blocks for a theme, however we don't have a great way to do this for individual blocks. If we wanted to add this, then we would probably need to add an option to the font style object.

In case you are curious, the way to do this for all blocks:

.zelos-renderer.classic-theme .blocklyText {
    fill: red;
  }