culori
culori copied to clipboard
mix() function, and 2d/3d counterparts
The idea came up in #207 that it would be nice to have mix*()
helper functions as shortcuts to linear, bilinear, and trilinear interpolation of colors in a particular color space:
-
mix([colorA, colorB])(t)
is equivalent tointerpolate([colorA, colorB])
-
mix2d(colors)(tx, ty)
for bilinear interpolation -
mix3d(colors)(tx, ty, tz)
for trilinear interpolation