[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
some sort of algorithm that will take a single color that is defined for the "background" and scale it so that the widget remains discriminable from the background, etc. What is the algorithm? [Last modified: Oct 94] Answer: Chris Flatters (cflatter@nrao.edu) writes: Shiz Kobara's book "Visual Design with OSF/Motif", Addison Wesley, 1991, ISBN 0-201-56320-7) is a good source for information of this sort. I haven't seen it in bookshops for a while so it may have gone out of print (which would be a pity). In essence each widget has 4 colours which, to first order, are background select (background * 85%) top shadow (background * 150%) bottom shadow (background * 50%) An additional correction may be applied to the hues of the calculated colours if any of the RGB values saturates. The algorithm works best if the brightest of the RGB components lies in the range 155-175 (on a scale of 0-255). The top shadow becomes darker than the background for light background colours which does not lead to a particularly pleasing effect.
Send corrections/additions to the FAQ Maintainer:
Last Update May 13 2007 @ 00:23 AM