/// <summary></summary> /// <param name="color"></param> /// <param name="lightratio"></param> /// <param name="lighterratio"></param> /// <param name="darkratio"></param> /// <param name="darkerratio"></param> public ColorRange(Color color, float lightratio, float lighterratio, float darkratio, float darkerratio) { BaseColor = color; Light = ColorRange.Tint(lightratio, color); Lighter = ColorRange.Tint(lighterratio, color); Dark = ColorRange.Shade(darkratio, color); Darker = ColorRange.Shade(darkerratio, color); }
/// <summary></summary> /// <param name="color"></param> public ColorRange(Color color) { BaseColor = color; Light = ColorRange.Tint(0.6f, color); Lighter = ColorRange.Tint(0.3f, color); Dark = ColorRange.Shade(0.8f, color); Darker = ColorRange.Shade(0.6f, color); }
private void Build() { this.range = new Color[colors]; Color current = color; range[0] = current; for (int i = 1; i < colors; i++) { if (shade) { range[i] = ColorRange.Shade(factor, current); } else { range[i] = ColorRange.Tint(factor, current); } current = range[i]; } }