cimug-org / CIMTool

CIMug's CIMTool for the Common Information Model (CIM).
http://cimtool.ucaiug.io/
GNU Lesser General Public License v2.1
44 stars 5 forks source link

Account for gamma and luminance levels to determine proper font colors based on user-defined background colors #173

Closed tviegut closed 1 month ago

tviegut commented 1 month ago

During development of #172 additional testing of user-defined colors surfaced that when darker colors are selected, the default font #000000 is unreadable. This prevents color selection that would allow for a Dark Mode theme for example. The font color should be dynamically determined (either white or black) based upon the gamma and luminance levels for each particular selected background color (e.g. for a concrete class or an abstract class).

The threshold should be: luminance < 0.5 use #FFFFFF else use #000000

Finally, if time permits, this may be an opportunity to add a simple Dark Mode theme setting in CIMTool user preferences. Below is the sample we're aiming for:

image