public void SetupHueGradient(float saturation = 1.0f, float brightness = 1.0f, int accuracy = 256) { ColorBlend blend = new ColorBlend(); blend.Colors = new Color[] { ColorExtension.ColorFromHSV(0.0f, saturation, brightness), ColorExtension.ColorFromHSV(1.0f / 6.0f, saturation, brightness), ColorExtension.ColorFromHSV(2.0f / 6.0f, saturation, brightness), ColorExtension.ColorFromHSV(3.0f / 6.0f, saturation, brightness), ColorExtension.ColorFromHSV(4.0f / 6.0f, saturation, brightness), ColorExtension.ColorFromHSV(5.0f / 6.0f, saturation, brightness), ColorExtension.ColorFromHSV(1.0f, saturation, brightness) }; blend.Positions = new float[] { 0.0f, 1.0f / 6.0f, 2.0f / 6.0f, 3.0f / 6.0f, 4.0f / 6.0f, 5.0f / 6.0f, 1.0f }; this.SetupGradient(blend, accuracy); }