RGB to HSV to RGB - for Shaders

TL;DR: Go here to get the RGB->HSV and HSV->RGB conversion functions for shaders. The other day I tried to tint a colour in a texture (or rather all texture) with a different colour. It's quite easy to rotate things around, but, if you want to do it