ColorScheme.highContrastLight constructor

const ColorScheme.highContrastLight({
  1. Brightness brightness = Brightness.light,
  2. Color primary = const Color(0xff0000ba),
  3. Color onPrimary = Colors.white,
  4. Color? primaryContainer,
  5. Color? onPrimaryContainer,
  6. Color? primaryFixed,
  7. Color? primaryFixedDim,
  8. Color? onPrimaryFixed,
  9. Color? onPrimaryFixedVariant,
  10. Color secondary = const Color(0xff66fff9),
  11. Color onSecondary = Colors.black,
  12. Color? secondaryContainer,
  13. Color? onSecondaryContainer,
  14. Color? secondaryFixed,
  15. Color? secondaryFixedDim,
  16. Color? onSecondaryFixed,
  17. Color? onSecondaryFixedVariant,
  18. Color? tertiary,
  19. Color? onTertiary,
  20. Color? tertiaryContainer,
  21. Color? onTertiaryContainer,
  22. Color? tertiaryFixed,
  23. Color? tertiaryFixedDim,
  24. Color? onTertiaryFixed,
  25. Color? onTertiaryFixedVariant,
  26. Color error = const Color(0xff790000),
  27. Color onError = Colors.white,
  28. Color? errorContainer,
  29. Color? onErrorContainer,
  30. Color surface = Colors.white,
  31. Color onSurface = Colors.black,
  32. Color? surfaceDim,
  33. Color? surfaceBright,
  34. Color? surfaceContainerLowest,
  35. Color? surfaceContainerLow,
  36. Color? surfaceContainer,
  37. Color? surfaceContainerHigh,
  38. Color? surfaceContainerHighest,
  39. Color? onSurfaceVariant,
  40. Color? outline,
  41. Color? outlineVariant,
  42. Color? shadow,
  43. Color? scrim,
  44. Color? inverseSurface,
  45. Color? onInverseSurface,
  46. Color? inversePrimary,
  47. Color? surfaceTint,
  48. @Deprecated('Use surface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? background = Colors.white,
  49. @Deprecated('Use onSurface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? onBackground = Colors.black,
  50. @Deprecated('Use surfaceContainerHighest instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? surfaceVariant,
})

Create a high contrast ColorScheme based on a purple primary color that matches the baseline Material 2 color scheme.

This constructor shouldn't be used to update the Material 3 color scheme.

For Material 3, use ColorScheme.fromSeed to create a color scheme from a single seed color based on the Material 3 color system. To create a high-contrast color scheme, set contrastLevel to 1.0.

This example demonstrates how to create a color scheme similar to ColorScheme.highContrastLight using the ColorScheme.fromSeed constructor:
link
colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xff0000ba)).copyWith(
  primaryContainer: const Color(0xff0000ba),
  onPrimaryContainer: Colors.white,
  secondaryContainer: const Color(0xff66fff9),
  onSecondaryContainer: Colors.black,
  error: const Color(0xff790000),
  onError: Colors.white,
),

Implementation

const ColorScheme.highContrastLight({
  this.brightness = Brightness.light,
  this.primary = const Color(0xff0000ba),
  this.onPrimary = Colors.white,
  Color? primaryContainer,
  Color? onPrimaryContainer,
  Color? primaryFixed,
  Color? primaryFixedDim,
  Color? onPrimaryFixed,
  Color? onPrimaryFixedVariant,
  this.secondary = const Color(0xff66fff9),
  this.onSecondary = Colors.black,
  Color? secondaryContainer,
  Color? onSecondaryContainer,
  Color? secondaryFixed,
  Color? secondaryFixedDim,
  Color? onSecondaryFixed,
  Color? onSecondaryFixedVariant,
  Color? tertiary,
  Color? onTertiary,
  Color? tertiaryContainer,
  Color? onTertiaryContainer,
  Color? tertiaryFixed,
  Color? tertiaryFixedDim,
  Color? onTertiaryFixed,
  Color? onTertiaryFixedVariant,
  this.error = const Color(0xff790000),
  this.onError = Colors.white,
  Color? errorContainer,
  Color? onErrorContainer,
  this.surface = Colors.white,
  this.onSurface = Colors.black,
  Color? surfaceDim,
  Color? surfaceBright,
  Color? surfaceContainerLowest,
  Color? surfaceContainerLow,
  Color? surfaceContainer,
  Color? surfaceContainerHigh,
  Color? surfaceContainerHighest,
  Color? onSurfaceVariant,
  Color? outline,
  Color? outlineVariant,
  Color? shadow,
  Color? scrim,
  Color? inverseSurface,
  Color? onInverseSurface,
  Color? inversePrimary,
  Color? surfaceTint,
  @Deprecated(
    'Use surface instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.'
  )
  Color? background = Colors.white,
  @Deprecated(
    'Use onSurface instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.'
  )
  Color? onBackground = Colors.black,
  @Deprecated(
    'Use surfaceContainerHighest instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.'
  )
  Color? surfaceVariant,
}) : _primaryContainer = primaryContainer,
     _onPrimaryContainer = onPrimaryContainer,
     _primaryFixed = primaryFixed,
     _primaryFixedDim = primaryFixedDim,
     _onPrimaryFixed = onPrimaryFixed,
     _onPrimaryFixedVariant = onPrimaryFixedVariant,
     _secondaryContainer = secondaryContainer,
     _onSecondaryContainer = onSecondaryContainer,
     _secondaryFixed = secondaryFixed,
     _secondaryFixedDim = secondaryFixedDim,
     _onSecondaryFixed = onSecondaryFixed,
     _onSecondaryFixedVariant = onSecondaryFixedVariant,
     _tertiary = tertiary,
     _onTertiary = onTertiary,
     _tertiaryContainer = tertiaryContainer,
     _onTertiaryContainer = onTertiaryContainer,
     _tertiaryFixed = tertiaryFixed,
     _tertiaryFixedDim = tertiaryFixedDim,
     _onTertiaryFixed = onTertiaryFixed,
     _onTertiaryFixedVariant = onTertiaryFixedVariant,
     _errorContainer = errorContainer,
     _onErrorContainer = onErrorContainer,
     _surfaceDim = surfaceDim,
     _surfaceBright = surfaceBright,
     _surfaceContainerLowest = surfaceContainerLowest,
     _surfaceContainerLow = surfaceContainerLow,
     _surfaceContainer = surfaceContainer,
     _surfaceContainerHigh = surfaceContainerHigh,
     _surfaceContainerHighest = surfaceContainerHighest,
     _onSurfaceVariant = onSurfaceVariant,
     _outline = outline,
     _outlineVariant = outlineVariant,
     _shadow = shadow,
     _scrim = scrim,
     _inverseSurface = inverseSurface,
     _onInverseSurface = onInverseSurface,
     _inversePrimary = inversePrimary,
     _surfaceTint = surfaceTint,
     // DEPRECATED (newest deprecations at the bottom)
     _background = background,
     _onBackground = onBackground,
     _surfaceVariant = surfaceVariant;