chroma_theme library

Classes

ChromaAuditor
Audits ColorScheme pairs against W3C WCAG 2.1 accessibility guidelines.
ChromaAuditReport
Comprehensive audit report for a ColorScheme.
ChromaBrandProfile
Represents a distinct brand styling profile for white-label or multi-tenant apps.
ChromaColorSchemeBuilder
ChromaContrastResult
Represents the accessibility contrast evaluation between foreground and background colors.
ChromaOverrides
A data class holding specific component theme overrides. Pass this to ChromaTheme to fine-tune the generated Material 3 theme.
ChromaPaletteSelector
A horizontal scrollable or wrapped list of palette swatches.
ChromaSchedule
Configuration for time-based, automatic sunrise/sunset theme switching.
ChromaSeeds
ChromaSeeds defines optional seed colors for generating a ColorScheme.
ChromaTheme
Root widget that provides and animates dynamic Material 3 themes.
ChromaThemeBuilder
ChromaThemeController
ChromaThemeExporter
Exports runtime ColorScheme and ThemeData configurations into clean, dependency-free standalone Dart source code.
ChromaThemeInherited
ChromaThemeToggle
A drop-in segmented or icon button to switch between Light, Dark, and AMOLED modes.
ChromaThemeUtils
ChromaTonalPalette
Represents a Material 3 Tonal Palette (0 to 100).
ChromaTones
Container for all tonal palettes generated for the current theme.
ImageThemeExtractor
Helper to extract dynamic Material 3 ColorScheme and primary seed colors from any Flutter ImageProvider (network, asset, file, or memory).
InMemoryThemePersistence
A lightweight, in-memory implementation of ThemePersistence useful for testing and ephemeral session state.
PaletteEntry
Holds light, dark, and high-contrast builder callbacks for a single palette.
PaletteRegistry
ThemePersistence
An abstract interface for persisting ChromaTheme state. Developers can implement this using SharedPreferences, Hive, Isar, etc., keeping the core package decoupled and native-dependency free.

Enums

ChromaPalette
ChromaThemeMode
Defines the supported theme modes for Chroma Theme.

Extensions

ChromaThemeExtension on BuildContext
Extension on BuildContext to provide quick access to ChromaTheme properties. This drastically improves Developer Experience (DX).

Functions

registerDefaultPalettes() → void
Registers all 22 built-in palettes with Light, Dark, and High-Contrast schemes.
showChromaThemeSheet(BuildContext context) → Future<void>
Displays a ready-to-use theme settings modal bottom sheet.

Typedefs

ChromaAuditResult = ChromaAuditReport
Backward compatibility alias.
ChromaContrastPair = ChromaContrastResult
Backward compatibility alias.
ChromaThemeBuilderCallback = Widget Function(BuildContext context, ThemeData theme, ThemeData darkTheme, ThemeMode themeMode)
Callback signature for ChromaTheme.builder.
FixedSchemeBuilder = ColorScheme Function()