Optimized conversion from/to RGB and HSV.
Sanity check: destroy root view when gl context is destroyed