culori icon indicating copy to clipboard operation
culori copied to clipboard

mix() function, and 2d/3d counterparts

Open danburzo opened this issue 1 year ago • 0 comments

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 to interpolate([colorA, colorB])
  • mix2d(colors)(tx, ty) for bilinear interpolation
  • mix3d(colors)(tx, ty, tz) for trilinear interpolation

danburzo avatar Jul 23 '23 12:07 danburzo