craRainbowButtons;
example 2: craRainbowRamp(color steps, saturation, value)
source craRainbowButtons;
{
vector $colors[] = `craRainbowRamp 16 1 1`;
print $colors;
}
//result
1 0 0
1 0.375 0
1 0.75 0
0.875 1 0
0.5 1 0
0.125 1 0
0 1 0.25
0 1 0.625
0 1 1
0 0.625 1
0 0.25 1
0.125 0 1
0.5 0 1
0.875 0 1
1 0 0.75
1 0 0.375
//useful proc
global proc vector[] craRainbowRamp(int $steps, float $saturation, float $value)
{
float $inc = 1.0/($steps);
float $hue = 0;
vector $rainbowRamp[];
for($b=0; $b<$steps; $b++)
{
$rainbowRamp[size($rainbowRamp)] = `hsv_to_rgb <<$hue, $saturation, $value>>`;
$hue+=$inc;
}
return $rainbowRamp;
}
Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.


