Godot: White Themes! Editor Theme font color based on theme color

Created on 24 May 2017  路  16Comments  路  Source: godotengine/godot

Bright themes are currently not supported, because the font color is white.
It should change to black after a specific threshold.

enhancement editor usability

Most helpful comment

it is easy to make dark font color if base color i's bright.
but it is more complicated with Colored icons.
I had tried it once.

All 16 comments

it is easy to make dark font color if base color i's bright.
but it is more complicated with Colored icons.
I had tried it once.

the only easy soultion to this problem is to generate a set of dark icons, this can be easily done on svg export.

@djrm would it be worth to think about making all icons white (except multicolour icons) and than modulating all the icon colors.
I was thinking about this since some time, since this would also allow slightly different icon colors. or even non colored icons.
We would need to be able to store an icon WITH the modulation color in one object than though...

@toger5 actually my solution is easier than that, i was thinking about simply replacing the svg colors when the exporter gets the data from the SVG file, since all the icons have predictable html color codes, we can create a map, to transform lets say white -> black, so the output of the script would 2 different set of icons, on for white themes and other for light themes, we would just have to select the correct variation given the base color.

also this method has complete flexibility and icon quality, since we dont need to modulate.

@toger5 thats also the reason why im trying to remove all the hard coded colors, so a convention would have to be set for every usable color in the engine.

@djrm yea it would be easier to just have two icons. And than do:

set_icon("class","icon", dark_icons ? icon_dark : icon);

But this would only allow for a limited flexibility. What if we want to change 3d to a more intense red, or if we want to change the color entirely.
All icons would beed to be reexported abd the engine recompiled. With modulation those chnages would ve really really simple. Also wouldnt make it necassaey to save all png icons twice (dark and bright version).

Another opion would be wait for 2d meshes + svg to 2d mesh importer.
Than all icons could be 2dmeshes and 2d mesh could have a color which is changeable. This also would remove multiple icon sets.

@toger5 no, thats not a good idea, first there would be a masive amount of changes and we would need developers to remember to set dark icons or light icons, it should be something like using hiDPI where there are no changes to gui elements code, only in the configuration selects the correct icons,

also i dont think giving the user the ability to choose specific colors for icons is a good idea, first they color codes are important for educational reasons, tutotials, etc.. all should use the same color coding. giving the user so much customization options is not a good idea, basicallly no we have to consider the dark icons case because now the editor can be white.

Your points make a lot of sense...
Just really didnt like the idea of having so many icon versions: (hi, mid, lowdpi) * (light, dark)
But since i totally agree that too many options, however good they sound, are nit the best choice this is probably the better choice. I just hoped i could make the more saturated but maybe, if others also want them kore saturated we still can do so.

For the dark icons than.
We could use a grey-blue color, might look good but would decrease the amount of highlight colors which would look good. So maybe we should just use sth like #555 or even darker.

@toger5 yeah i would also like the icons to be a bit more saturated, but they preserve their original colors, maybe we could change them now that its the time for breaking things.

@djrm good idea!
What colors would u propose? For both more saturated icons + light theme editor_icons?

What do you think about the syntax i proposed:
set_icon("stringA","steingB", dark_icons ? Icon_dark : icon)
Or do u have a better idea how we dont need to change all set icon calls un editor_themes.cpp.
Maybe a fucntion which changes the icons (light or dark) that are stored in the icon constants?

What else is needed than rerendering all the svg's wih differnt colors, loading the right icons + setting the font color when the theme color is lighter than #808080

@toger5 we cant change the set_icon function because it is used in a lot of places, not only in editor_themes, so we have to do something simillar to what is done for hiDPI icons.

for the svgs, i will make an script that extract all the colors used in the svgs so we can clasify them in a color conversion map, that way we can specify a conversion table in the export script, so we dont need to change the actual svgs (which are a lot).

@toger5 also i already implemented the dark and light color but only for window title, you can check it, it is already on master, the idea was to get the average of the rgb components and test if it is > .5

@djrm I started working on this and made decent process.

I made a new folder structure for icons:

|-icons
    |-1x
      |-dark
    |-2x
      |-dark
      |-light
  • changed the svgs to png script
  • and the script which generates the headers. and assigned the icons to the map.

@toger5 i dont know if this will be needed anymore, since currently im working on svg support, but the thing that we will definetly need is the conversion table mentioned (for color conversions).

I actually kept the svg importer in mind when adding the feature. You just need to change how make_icon() works.

Ill add the pr tomorrow.

Can be closed now that #10382 is merged

Was this page helpful?
0 / 5 - 0 ratings