WoW:USERAPI ColorGradient: Difference between revisions

Add performance note for the common case.
No edit summary
(Add performance note for the common case.)
Line 3: Line 3:


Converts a percent value into a gradient from 2 or more RGB percent values (0.0-1.0).  If more than 2 colors are passed, the gradient will be between the two colors which perc lies in an evenly divided range.
Converts a percent value into a gradient from 2 or more RGB percent values (0.0-1.0).  If more than 2 colors are passed, the gradient will be between the two colors which perc lies in an evenly divided range.
(Note that if you will always be generating a gradient between the same number of colors, you will see *significantly* greater performance if you customize this function to take a fixed number of arguments.)


  local function ColorGradient(perc, ...)
  local function ColorGradient(perc, ...)
Anonymous user