[Suggestion] Contrast in Label dropdown list (solution included)

User avatar
latinmusePTY
Posts: 19
Joined: Wed Dec 13, 2017 7:41 pm
Platform: Windows
Location: Panama
Contact:

Wed Dec 13, 2017 9:36 pm Post

Up to now Labels have a color associated with it (would be nice if Status did too). And when a document is selected the current Label is also shown on a dropdown list on the status bar underneath the Inspector.

The problem being that depending on the Label color the user chooses, the foreground color (Label text) may not be visible at all, or hardly visible. Works fine as long as the chosen color is light.

There is a simple solution to that and I have used it in a couple of my software applications. There is a simple algorithm I picked up somewhere in StackOverflow that calculates the proper foreground based on background (or the other way around). One of such algorightms is here:

https://stackoverflow.com/questions/676 ... r-contrast

by using that, it does not matter what color the user selected for the Label color because you can calculate a proper foreground color for the text in the dropdown. Hope that simple solution gets implemented on the next Beta (or release)
http://lordofthings.wordpress.com/
Twitter: @lordofscripts