public override UnityEngine.Color GetColour(double x, double y) { float r = (float)x; float g = (float)Saturation.GetValue(x, y); float b = (float)Lightness.GetValue(x, y); HsvRgb.ToRgb(ref r, ref g, ref b); return(new UnityEngine.Color(r, g, b, 1f)); }
public override UnityEngine.Color GetColour(double x, double y) { // Read H: float h = (float)HueModule.GetValue(x, y); // Read S: float s = (float)SaturationModule.GetValue(x, y); // Read V: float v = (float)BrightModule.GetValue(x, y); // Convert to RGB: HsvRgb.ToRgb(ref h, ref s, ref v); // Now RGB. return(new Color(h, s, v, 1f)); }