Top | Previous | Next |
Colors / gradient |
gradient(number, low, high, lowColor, highColor) Calculates a percentage given the three numeric arguments number, low, and high. Uses this percentage to create a color that is a mix between the two colors.
gradient(0, 0, 100, toColor("red"), toColor("blue")) ...returns red.
gradient(100, 0, 100, toColor("red"), toColor("blue")) ...returns blue.
gradient(60, 0, 100, toColor("red"), toColor("blue")) ...returns a shade of purple.
gradient({Root Container.Tank.value}, 0, 100, color(255,0,0), color(0,0,255)) ...will return a gradient from red to blue based on the level of a tank. |