<static> interpolateRGB(r1, g1, b1, r2, g2, b2, steps, currentStep) → {number}
Interpolates the two given colours based on the supplied step and currentStep properties.
Parameters
Name | Type | Description |
---|---|---|
r1 | number | The red color value, between 0 and 0xFF (255). |
g1 | number | The green color value, between 0 and 0xFF (255). |
b1 | number | The blue color value, between 0 and 0xFF (255). |
r2 | number | The red color value, between 0 and 0xFF (255). |
g2 | number | The green color value, between 0 and 0xFF (255). |
b2 | number | The blue color value, between 0 and 0xFF (255). |
steps | number | The number of steps to run the interpolation over. |
currentStep | number | The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. |
Returns
number -
The interpolated color value.
- Source code: utils/Color.js (Line 810)
Please login to continue.