|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Hexadecimal Arithmetic
Maulik Modi writes: >Now I want to color code each table row depending on the value of >the "level" attribute. That's done. Now I want to give each row a >different gradient of the same color depending on the value of the >"level". The value of the level ranges from 1-10. I wanted to take >this and use it with hexadecimal arithmetic. Does anyone know how? That's an intriguing problem. You can write an extension function, which removes all the intrigue, or you can look at a range of XSLT approaches. The range spans from pure computational to tables and lookups, and to decide which is best, you need to provide more information: 1. Is the color code just one linear scale (10 steps) or a matrix (10 x N) of gradients for different colors? 2. If a matrix, what is N above? 3. A gradient to where? Let's say level 10 is the color at full strength. Is level 1 whiter? blacker? redder? Or does it depend on the other dimension of the matrix, so it's different for each? 4. Will the gradient be linear, or does it look better to have specified steps? If the numbers are small, I suspect that table lookups are the way to go. In other words, you would pre-calculate the color values and store them in an XSL keyspace. .................David Marston XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








