public void NotifyRGBUpdated() { // Set HSV from RGB HSV.ToHSV(tempColour, out _H, out _S, out _V); _A = tempColour.a; // rebuild textures CreateColourPickerBG(); CreateHuePickerBG(); CreateAlphaPickerBG(); // set slider positions _huePosition = (1f - _H) / UnitsPerPixel; _position.x = _S / UnitsPerPixel; _position.y = (1f - _V) / UnitsPerPixel; _alphaPosition = (1f - _A) / UnitsPerPixel; // set the colour block and update hex fields CreatePreviewBG(ref _tempPreviewBG, tempColour); _hexOut = _hexIn = RGBtoHex(tempColour); }