flex_color_scheme library
A library to help you make beautiful color scheme based themes for Flutter.
Classes
- Blend
- Functions for blending in HCT and CAM16.
- Cam16
- CAM16, a color appearance model. Colors are not just defined by their hex code, but rather, a hex code and viewing conditions.
- CorePalette
- An intermediate concept between the key color for a UI theme, and a full color scheme. 5 tonal palettes are generated, all except one use the same hue as the key color, and all vary in chroma.
- DynamicColor
- A color that adjusts itself based on UI state provided by DynamicScheme.
- DynamicScheme
- Constructed by a set of values representing the current UI state (such as whether or not its dark theme, what the theme style is, etc.), and provides a set of TonalPalettes that can create colors that fit in with the theme style. Used by DynamicColor to resolve into a color.
- FlexAdaptive
-
The FlexAdaptive class is used to define on what platforms
FlexColorScheme generated
ThemeDataplatform adaptive theming responses are used. - FlexColor
- Defines colors, names and color schemes used to make maps and a list of predefined FlexSchemeData objects that can be used by FlexColorScheme.
- FlexColorScheme
-
Make beautiful Flutter themes using pre-designed color schemes or custom
colors. Get the resulting
ThemeDatawith the toTheme getter. - FlexCorePalette
- An intermediate concept between the key color for a UI theme, and a full color scheme. Six tonal palettes are generated, where the error palette defaults to the Material-3 hue 25, chroma 84 palette if not provided.
- FlexKeyColors
-
Immutable data class that configures if and how FlexColorScheme uses
key colors to populate the Material-3
ColorSchemeit creates and uses to generate itsThemeDataobject. - FlexSchemeColor
- Immutable color data class for the main scheme colors used in a FlexColorScheme based color scheme and theming engine.
- FlexSchemeData
- Immutable data class that holds name and description string scheme descriptions, light and dark, FlexSchemeColor definitions.
- FlexSchemeOnColors
- Immutable data class used to create "on" colors for displaying text and icons on surface, error colors and the primary, secondary and tertiary colors.
- FlexSchemeSurfaceColors
- Immutable data class used to make surface colors in a FlexColorScheme.
- FlexSubThemes
- A class container with static sub-theme helper functions used by component theming in FlexColorScheme.
- FlexSubThemesData
- Parameters used by FlexColorScheme to configure its used FlexSubThemes.
- FlexThemeModeOptionButton
- Stateless widget that draws a box with the 4 colors, primary, primary variant secondary and secondary variant in the properties of passed in flexSchemeColor.
- FlexThemeModeSwitch
- A 3-way Light, Dark and System theme-mode switch widget.
- FlexTonalPalette
- A convenience class for retrieving colors that are constant in hue and chroma, but vary in tone.
- FlexTones
-
Configuration data class that defines which tone to use from each
FlexTonalPalette when assigning used color to each
ColorSchemecolor. - Hct
- HCT, hue, chroma, and tone. A color system that provides a perceptually accurate color measurement system that can also accurately render what colors will appear as in different lighting environments.
- MaterialDynamicColors
- Tokens, or named colors, in the Material Design system.
- Scheme
- This class is the same concept as Flutter's ColorScheme class.
- TonalPalette
- A convenience class for retrieving colors that are constant in hue and chroma, but vary in tone.
- ViewingConditions
- In traditional color spaces, a color can be identified solely by the observer's measurement of the color. Color appearance models such as CAM16 also use information about the environment where the color was observed, known as the viewing conditions.
Enums
- FlexAppBarStyle
- Enum to select the used AppBarTheme style in FlexColorScheme (FCS) based themes when using its FlexColorScheme.light and FlexColorScheme.dark factories.
- FlexFixedColorStyle
-
The style and method used to compute the fixed, fixedDim colors and their
on colors in a
ColorSchemeusing the palettes provided main light mode color. - FlexInputBorderType
- Enum used to select the type of border used on by the input decorator in FlexSubThemes.inputDecorationTheme.
- FlexPaletteType
- Enum used to select tones included in produced FlexTonalPalette.
- FlexScaffoldBaseColor
-
Base color used as
ThemeData.scaffoldBackgroundColorin a theme produced by FlexColorScheme.light and FlexColorScheme.dark factories. - FlexScheme
- Enum that can be used to lookup predefined FlexSchemeData color theme definition objects.
- FlexSchemeVariant
-
Enum used to return and describe properties of the FlexSchemeVariant
variants to invoke different color scheme generation algorithms
in SeedColorScheme.fromSeeds, when passed to its FlexSchemeVariant
property
variant. - FlexSliderIndicatorType
-
Enum used to select the type of built-in value indicator used by
Slider. - FlexSplashType
- An enum for easy configuration and selection of ink splash effect.
- FlexSurfaceMode
- Enum for using predefined surface blend modes for all surfaces and scaffold background colors in FlexColorScheme based themes.
- Enum used to define the SystemUiOverlayStyle for the system navigation bar.
- FlexTabBarStyle
-
Enum to select
TabBarThemeDatapreference in FlexColorScheme based themes. - FlexThemeModeButtonOrder
- Enum used to define the order, from left to right, of the theme mode selection buttons on the FlexThemeModeSwitch.
- SchemeColor
-
Enum used to describe which color from the active theme's
ColorSchemecolors, should be used for color properties available in component sub-themes.
Extensions
- FlexColorExtensions on Color
- Extensions on Color to brighten, lighten, darken and blend colors and can get a shade for gradients.
- FlexColorSeedColorExtensions on Color
- Public extensions on Color.
- FlexStringExtensions on String
- Extensions on String.
- FlexThemeData on ThemeData
-
A convenience extension on
ThemeDatato define a FlexColorScheme object and return theThemeDataobject defined by its instance, using its FlexColorScheme.toTheme getter in one go. - SeedColorScheme on ColorScheme
-
Extension on
ColorSchemeto provide a more flexible alternative to Flutter's Material 3ColorScheme.fromSeed.