private void ValidateAndSet(float r, float g, float b) { if (!IsValid(r, g, b)) { throw new ArgumentException("Invalid variable value."); } else { this.r = r; this.g = g; this.b = b; } }