ZetaColors constructor

ZetaColors({
  1. Brightness brightness = Brightness.light,
  2. ZetaContrast contrast = ZetaContrast.aa,
  3. Color white = ZetaColorBase.white,
  4. Color black = ZetaColorBase.black,
  5. ZetaColorSwatch? primary,
  6. ZetaColorSwatch? secondary,
  7. ZetaColorSwatch? error,
  8. ZetaColorSwatch? cool,
  9. ZetaColorSwatch? warm,
  10. ZetaColorSwatch? pure,
  11. Color? surfacePrimary,
  12. Color? surfaceSecondary,
  13. Color? surfaceTertiary,
  14. bool adjust = true,
  15. @Deprecated('This color has been deprecated as of v0.10.0') dynamic link,
  16. @Deprecated('This color has been deprecated as of v0.10.0') dynamic linkVisited,
  17. @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);