private void Update() { if (gameObject.activeInHierarchy) { rValueText.text = RValue.ToString(); gValueText.text = GValue.ToString(); bValueText.text = BValue.ToString(); newColor = new Color32(System.Convert.ToByte(RValue), System.Convert.ToByte(GValue), System.Convert.ToByte(BValue), 255); colorPreview.color = newColor; } if (timer > 0) { timer -= Time.deltaTime; } else { if (mouseDownIncrease) { IncreaseColorValue((int)rGB); } if (mouseDownDecrease) { DecreaseColorValue((int)rGB); } } }