ZetaColors constructor
- Brightness brightness = Brightness.light,
- ZetaContrast contrast = ZetaContrast.aa,
- Color white = ZetaColorBase.white,
- Color black = ZetaColorBase.black,
- ZetaColorSwatch? primary,
- ZetaColorSwatch? secondary,
- ZetaColorSwatch? error,
- ZetaColorSwatch? cool,
- ZetaColorSwatch? warm,
- ZetaColorSwatch? pure,
- Color? surfacePrimary,
- Color? surfaceSecondary,
- Color? surfaceTertiary,
- bool adjust = true,
- @Deprecated('This color has been deprecated as of v0.10.0') dynamic link,
- @Deprecated('This color has been deprecated as of v0.10.0') dynamic linkVisited,
- @Deprecated('This color has been deprecated as of v0.10.0') dynamic shadow,
Default constructor for instance of ZetaColors.
Implementation
ZetaColors({
this.brightness = Brightness.light,
this.contrast = ZetaContrast.aa,
this.white = ZetaColorBase.white,
this.black = ZetaColorBase.black,
ZetaColorSwatch? primary,
ZetaColorSwatch? secondary,
ZetaColorSwatch? error,
ZetaColorSwatch? cool,
ZetaColorSwatch? warm,
ZetaColorSwatch? pure,
Color? surfacePrimary,
Color? surfaceSecondary,
Color? surfaceTertiary,
bool adjust = true,
@Deprecated('This color has been deprecated as of v0.10.0') link,
@Deprecated('This color has been deprecated as of v0.10.0') linkVisited,
@Deprecated('This color has been deprecated as of v0.10.0') shadow,
}) : primary = _adjustedValue(primary, ZetaColorBase.blue, adjust, brightness, contrast),
secondary = _adjustedValue(secondary, primary ?? ZetaColorBase.yellow, adjust, brightness, contrast),
error = _adjustedValue(error, ZetaColorBase.red, adjust, brightness, contrast),
cool = _adjustedValue(cool, ZetaColorBase.cool, adjust, brightness, ZetaContrast.aa),
warm = _adjustedValue(warm, ZetaColorBase.warm, adjust, brightness, ZetaContrast.aa),
pure = _adjustedValue(pure, ZetaColorBase.pure, adjust, brightness, ZetaContrast.aa),
surfacePrimary = surfacePrimary ?? white,
surfaceSecondary = surfaceSecondary ??
_adjustedValue(
cool,
ZetaColorBase.cool,
adjust,
brightness,
ZetaContrast.aa,
).shade10,
surfaceTertiary = surfaceTertiary ??
_adjustedValue(
warm,
ZetaColorBase.warm,
adjust,
brightness,
ZetaContrast.aa,
).shade10,
blue = _adjustedBase(ZetaColorBase.blue, adjust, brightness, contrast),
green = _adjustedBase(ZetaColorBase.green, adjust, brightness, contrast),
red = _adjustedBase(ZetaColorBase.red, adjust, brightness, contrast),
orange = _adjustedBase(ZetaColorBase.orange, adjust, brightness, contrast),
purple = _adjustedBase(ZetaColorBase.purple, adjust, brightness, contrast),
yellow = _adjustedBase(ZetaColorBase.yellow, adjust, brightness, contrast),
teal = _adjustedBase(ZetaColorBase.teal, adjust, brightness, contrast),
pink = _adjustedBase(ZetaColorBase.pink, adjust, brightness, contrast);