You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Components/Themes/Models/Palette.cs

157 lines
7.0 KiB

using Connected.Utilities;
using C = Connected.Colors;
using Clr = Connected.Utilities.Color;
namespace Connected;
public class Palette
{
private Clr _primaryDarken = null;
private Clr _primaryLighten = null;
private Clr _secondaryDarken = null;
private Clr _secondaryLighten = null;
private Clr _tertiaryDarken = null;
private Clr _tertiaryLighten = null;
private Clr _infoDarken = null;
private Clr _infoLighten = null;
private Clr _successDarken = null;
private Clr _successLighten = null;
private Clr _warningDarken = null;
private Clr _warningLighten = null;
private Clr _errorDarken = null;
private Clr _errorLighten = null;
private Clr _darkDarken = null;
private Clr _darkLighten = null;
public virtual Clr Black { get; set; } = "#272c34";
public Clr White { get; set; } = C.Shades.White;
public virtual Clr Primary { get; set; } = "#594AE2";
public Clr PrimaryContrastText { get; set; } = C.Shades.White;
public Clr Secondary { get; set; } = C.Pink.Accent2;
public Clr SecondaryContrastText { get; set; } = C.Shades.White;
public Clr Tertiary { get; set; } = "#1EC8A5";
public Clr TertiaryContrastText { get; set; } = C.Shades.White;
public virtual Clr Info { get; set; } = C.Blue.Default;
public Clr InfoContrastText { get; set; } = C.Shades.White;
public virtual Clr Success { get; set; } = C.Green.Accent4;
public Clr SuccessContrastText { get; set; } = C.Shades.White;
public virtual Clr Warning { get; set; } = C.Orange.Default;
public Clr WarningContrastText { get; set; } = C.Shades.White;
public virtual Clr Error { get; set; } = C.Red.Default;
public Clr ErrorContrastText { get; set; } = C.Shades.White;
public virtual Clr Dark { get; set; } = C.Grey.Darken3;
public Clr DarkContrastText { get; set; } = C.Shades.White;
public virtual Clr TextPrimary { get; set; } = C.Grey.Darken3;
public virtual Clr TextSecondary { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.54).ToString(ColorOutputFormats.RGBA);
public virtual Clr TextDisabled { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.38).ToString(ColorOutputFormats.RGBA);
public virtual Clr ActionDefault { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.54).ToString(ColorOutputFormats.RGBA);
public virtual Clr ActionDisabled { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.26).ToString(ColorOutputFormats.RGBA);
public virtual Clr ActionDisabledBackground { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.12).ToString(ColorOutputFormats.RGBA);
public virtual Clr Background { get; set; } = C.Shades.White;
public virtual Clr BackgroundGrey { get; set; } = C.Grey.Lighten4;
public virtual Clr Surface { get; set; } = C.Shades.White;
public virtual Clr DrawerBackground { get; set; } = C.Shades.White;
public virtual Clr DrawerText { get; set; } = C.Grey.Darken3;
public virtual Clr DrawerIcon { get; set; } = C.Grey.Darken2;
public virtual Clr AppbarBackground { get; set; } = "#594AE2";
public virtual Clr AppbarText { get; set; } = C.Shades.White;
public virtual Clr LinesDefault { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.12).ToString(ColorOutputFormats.RGBA);
public virtual Clr LinesInputs { get; set; } = C.Grey.Lighten1;
public virtual Clr TableLines { get; set; } = new Clr(C.Grey.Lighten2).SetAlpha(1.0).ToString(ColorOutputFormats.RGBA);
public virtual Clr TableStriped { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.02).ToString(ColorOutputFormats.RGBA);
public Clr TableHover { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.04).ToString(ColorOutputFormats.RGBA);
public virtual Clr Divider { get; set; } = C.Grey.Lighten2;
public virtual Clr DividerLight { get; set; } = new Clr(C.Shades.Black).SetAlpha(0.8).ToString(ColorOutputFormats.RGBA);
public string PrimaryDarken
{
get => (_primaryDarken ??= Primary.ColorRgbDarken()).ToString(ColorOutputFormats.RGB);
set => _primaryDarken = value;
}
public string PrimaryLighten
{
get => (_primaryLighten ??= Primary.ColorRgbLighten()).ToString(ColorOutputFormats.RGB);
set => _primaryLighten = value;
}
public string SecondaryDarken
{
get => (_secondaryDarken ??= Secondary.ColorRgbDarken()).ToString(ColorOutputFormats.RGB);
set => _secondaryDarken = value;
}
public string SecondaryLighten
{
get => (_secondaryLighten ??= Secondary.ColorRgbLighten()).ToString(ColorOutputFormats.RGB);
set => _secondaryLighten = value;
}
public string TertiaryDarken
{
get => (_tertiaryDarken ??= Tertiary.ColorRgbDarken()).ToString(ColorOutputFormats.RGB);
set => _tertiaryDarken = value;
}
public string TertiaryLighten
{
get => (_tertiaryLighten ??= Tertiary.ColorRgbLighten()).ToString(ColorOutputFormats.RGB);
set => _tertiaryLighten = value;
}
public string InfoDarken
{
get => (_infoDarken ??= Info.ColorRgbDarken()).ToString(ColorOutputFormats.RGB);
set => _infoDarken = value;
}
public string InfoLighten
{
get => (_infoLighten ??= Info.ColorRgbLighten()).ToString(ColorOutputFormats.RGB);
set => _infoLighten = value;
}
public string SuccessDarken
{
get => (_successDarken ??= Success.ColorRgbDarken()).ToString(ColorOutputFormats.RGB);
set => _successDarken = value;
}
public string SuccessLighten
{
get => (_successLighten ??= Success.ColorRgbLighten()).ToString(ColorOutputFormats.RGB);
set => _successLighten = value;
}
public string WarningDarken
{
get => (_warningDarken ??= Warning.ColorRgbDarken()).ToString(ColorOutputFormats.RGB);
set => _warningDarken = value;
}
public string WarningLighten
{
get => (_warningLighten ??= Warning.ColorRgbLighten()).ToString(ColorOutputFormats.RGB);
set => _warningLighten = value;
}
public string ErrorDarken
{
get => (_errorDarken ??= Error.ColorRgbDarken()).ToString(ColorOutputFormats.RGB);
set => _errorDarken = value;
}
public string ErrorLighten
{
get => (_errorLighten ??= Error.ColorRgbLighten()).ToString(ColorOutputFormats.RGB);
set => _errorLighten = value;
}
public string DarkDarken
{
get => (_darkDarken ??= Dark.ColorRgbDarken()).ToString(ColorOutputFormats.RGB);
set => _darkDarken = value;
}
public string DarkLighten
{
get => (_darkLighten ??= Dark.ColorRgbLighten()).ToString(ColorOutputFormats.RGB);
set => _darkLighten = value;
}
public double HoverOpacity { get; set; } = 0.06;
public string GrayDefault { get; set; } = C.Grey.Default;
public string GrayLight { get; set; } = C.Grey.Lighten1;
public string GrayLighter { get; set; } = C.Grey.Lighten2;
public string GrayDark { get; set; } = C.Grey.Darken1;
public string GrayDarker { get; set; } = C.Grey.Darken2;
public string OverlayDark { get; set; } = new Clr("#212121").SetAlpha(0.5).ToString(ColorOutputFormats.RGBA);
public string OverlayLight { get; set; } = new Clr(C.Shades.White).SetAlpha(0.5).ToString(ColorOutputFormats.RGBA);
}