toScheme method

ZetaColorScheme toScheme()

Returns a ZetaColorScheme based on the properties of the current ZetaColors.

Implementation

ZetaColorScheme toScheme() {
  final effectivePrimary = primary.shade(contrast.primary);
  final effectiveSecondary = secondary.shade(contrast.primary);
  final effectiveSurface = surfacePrimary;
  final effectiveError = error;

  return ZetaColorScheme(
    zetaColors: this,
    brightness: brightness,
    error: effectiveError,
    onError: effectiveError.onColor,
    onPrimary: effectivePrimary.onColor,
    onSecondary: effectiveSecondary.onColor,
    onSurface: textDefault,
    primary: effectivePrimary,
    secondary: effectiveSecondary,
    surface: effectiveSurface,
  );
}