Adverti horiz upsell

HSV Rainbow Ramp 1.0.0 for Maya (maya script)

Procedure that returns a rainbow ramp (vector array)

License
Button download
106 Downloads

Compatibility

  • 2015, 2014, 2013, 2012, 2011, 2010, 9.x, 2009, 2008, 8.x, 7.x, 6.x, 5.x, 4.x

Operating Systems

  • Linux
  • Mac
  • Windows

History

Created:05/09/2014
Last Modified:05/09/2014
File Size: 3.95 KB

Keywords

rainbow colors

example 1, useless UI with rainbow colored buttons:
           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.

More Items from author CharlieWales:

Show all 34 items from CharlieWales

People who favorited this item:

  • KL T
    KL T
  • yanruisang
    yanruisang
  • Alex Veresov
    Alex Veresov
  • crazy_creater
    crazy_creater
  • kaiyongman
    kaiyongman
  • binbin
    binbin