Is color math supported?

Hey Chris!

I think the code you need can be easily adapted from my “Crossfading” pattern in the pattern library (see top of page 2). Is uses an HSV-to-RGB conversion function to blend multiple patterns by summing RGB components in the way you describe.

I’ve also put some thought into blending HSV directly, by envisioning each as a vector in cylindrical HSV space and doing vector addition. I think this might be feasible and less math for faster results in just per-pixel blending.

I didn’t pursue it yet for computing gradients, because the math to compute some desirable paths smoothly (through black/white, around the wheel) involved quaternion math to do slerp.

1 Like