Top Document: Motif FAQ (Part 9 of 9) Previous Document: 309) How do I get correct shadow colors to match other color Next Document: 311) How can you access the superclass widget from which Motif See reader questions & answers on this topic! - Help others by sharing your knowledge 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. User Contributions:Top Document: Motif FAQ (Part 9 of 9) Previous Document: 309) How do I get correct shadow colors to match other color Next Document: 311) How can you access the superclass widget from which Motif Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: kenton@rahul.net (Ken Lee)
Last Update March 27 2014 @ 02:11 PM
|
Comment about this article, ask questions, or add new information about this topic: