Couple of people pointed loss of precision on HSB to RGB conversion. Originally I adopted code from cyzrgb without thinking much, and found some significant loss of precision.

I improve the code for higher precision conversion with slightly faster, smaller code. Single conversion takes about 25uS. The main algorithm is from https://github.com/adafruit/RGB-matrix-Panel/blob/master/examples/plasma/plasma.pde

 

You can simply install new version of HP RGB LED Library to take the advantage of improved conversion code. All existing codes compatible with new library.

HPRGB_Shield_V2_Library-v1.1.zip