generate static method
ZetaColorSwatch
generate(
- Color primary, {
- Brightness brightness = Brightness.light,
- ZetaContrast contrast = ZetaContrast.aa,
- Color background = Colors.white,
- bool adjustAccessibility = false,
Darker shades are obtained by darkening the primary color and lighter shades by lightening it.
- 100, 90, 80, and 70 are darker shades of the primary color.
- 60 is the primary color itself.
- 50, 40, 30, 20, and 10 are progressively lighter shades of the primary color.
Implementation
static ZetaColorSwatch generate(
Color primary, {
Brightness brightness = Brightness.light,
ZetaContrast contrast = ZetaContrast.aa,
Color background = Colors.white,
bool adjustAccessibility = false,
}) {
return ZetaColorSwatch(
contrast: contrast,
brightness: brightness,
primary: primary.value,
swatch: primary.generateSwatch(
background: background, adjustPrimary: adjustAccessibility,),
).apply(brightness: brightness);
}