public static void InitColors(Color themeColor, bool darkMode, bool themed) { if (darkMode) { ColorBorder = Color.White; ColorBackground = Color.FromArgb(50, 50, 50); ColorSelection = Color.FromArgb(80, 80, 80); if (themed) { ColorForeground = themeColor; } else { ColorForeground = Color.White; } ColorChecked = Color.FromArgb(90, 90, 90); } else { if (!themed) { themeColor = Color.FromArgb(238, 238, 238); } ColorBorder = HSLColor.Convert(themeColor).ToColorSetLuminosity(100); ColorChecked = HSLColor.Convert(themeColor).ToColorSetLuminosity(160); ColorSelection = HSLColor.Convert(themeColor).ToColorSetLuminosity(180); ColorBackground = HSLColor.Convert(themeColor).ToColorSetLuminosity(210); ColorTop = HSLColor.Convert(themeColor).ToColorSetLuminosity(240); } }
public static void InitColors(Color c) { ColorBorder = HSLColor.Convert(c).ToColorSetLuminosity(100); ColorChecked = HSLColor.Convert(c).ToColorSetLuminosity(200); ColorBottom = HSLColor.Convert(c).ToColorSetLuminosity(220); ColorBackground = HSLColor.Convert(c).ToColorSetLuminosity(230); ColorTop = HSLColor.Convert(c).ToColorSetLuminosity(240); ColorToolStrip1 = ControlPaint.LightLight(ControlPaint.LightLight(ControlPaint.Light(ColorBorder, 1))); ColorToolStrip2 = ControlPaint.LightLight(ControlPaint.LightLight(ControlPaint.Light(ColorBorder, 0.7f))); ColorToolStrip3 = ControlPaint.LightLight(ControlPaint.LightLight(ControlPaint.Light(ColorBorder, 0.1f))); ColorToolStrip4 = ControlPaint.LightLight(ControlPaint.LightLight(ControlPaint.Light(ColorBorder, 0.4f))); }
public static void InitColors(Color c) { ColorBorder = HSLColor.Convert(c).ToColorSetLuminosity(100); ColorChecked = HSLColor.Convert(c).ToColorSetLuminosity(160); ColorSelection = HSLColor.Convert(c).ToColorSetLuminosity(180); ColorBackground = HSLColor.Convert(c).ToColorSetLuminosity(210); ColorTop = HSLColor.Convert(c).ToColorSetLuminosity(240); if (ColorTheme == Color.Black) { ColorBorder = Color.White; ColorBackground = Color.FromArgb(50, 50, 50); ColorSelection = Color.FromArgb(80, 80, 80); ColorForeground = Color.White; ColorChecked = Color.FromArgb(90, 90, 90); } ColorToolStrip1 = ControlPaint.LightLight(ControlPaint.LightLight(ControlPaint.Light(ColorBorder, 1))); ColorToolStrip2 = ControlPaint.LightLight(ControlPaint.LightLight(ControlPaint.Light(ColorBorder, 0.7f))); ColorToolStrip3 = ControlPaint.LightLight(ControlPaint.LightLight(ControlPaint.Light(ColorBorder, 0.1f))); ColorToolStrip4 = ControlPaint.LightLight(ControlPaint.LightLight(ControlPaint.Light(ColorBorder, 0.4f))); }