Fix 'rgbToHex is not defined' error in viewport