Here's a snippet from a future project. None of the default color themes do what I want (making numbers at each end black or gray) so I passed a theme definition to heat color for the 2nd argument (instead of the name of a default theme).
colors = Heat Color(
(0 :: 800) / 800,
{"",
{
RGB Color( 0, 0, 0 ),
HLS Color( 4.0 / 10.0, .3, 1 ),
HLS Color( 5.0 / 10.0, .5, 1 ),
HLS Color( 6.0 / 10.0, .5, 1 ),
HLS Color( 7.0 / 10.0, .5, 1 ),
HLS Color( 8.0 / 10.0, .5, .7 ),
HLS Color( 9.0 / 10.0, .5, 1 ),
HLS Color( 0.0 / 10.0, .5, 1 ),
HLS Color( 1.0 / 10.0, .5, 1 ),
HLS Color( 2.0 / 10.0, .5, 1 ),
HLS Color( 3.0 / 10.0, .3, 1 ),
RGB Color( .5, .5, .5 )
},
As List( (1 :: 12) / 13 )[1]
}
);
For( i = 1, i <= 8, i++,
colors = colors |/ colors
);
pic = New Image( colors );
New Window( "Demo Heat Color", pic );
Showing the wash of color from Left to Right matching the color theme specification
Here's another approach.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.