Skip to content

qtUIManager: contrast text box colors with text color

T.J. Corona requested to merge tjcorona/smtk:contrast-with-text into master

The default colors defined in smtk::attribute::Definition presuppose the use of a dark font. This method tests the font lightness and, if the font color is light, it adapts the input color to contrast with it.

TODO: We may not want to define color in smtk::core. Instead, we may want to use Qt's convention of naming entities within a color palette rather than hard-coding colors; these descriptions should also live in the smtk::extensions::qt library, where they are used.

Merge request reports