grayscale 0.0.5+7 copy "grayscale: ^0.0.5+7" to clipboard
grayscale: ^0.0.5+7 copied to clipboard

Create grayscale color schemes in Flutter easily with this library. Convert ColorScheme and Color objects to grayscale effortlessly.

Grayscale Color Scheme for Flutter #

Grayscale UI for light theme      Grayscale UI for dark theme

Features #

  • Generate a grayscale ColorScheme
  • Convert Color and ColorScheme to grayscale

Getting started #

flutter pub add grayscale

Usage #

The mothod GrayColorScheme.highContrastGray(Brightness) returns a grayscale color sheme.

class GrayscaleApp extends StatelessWidget {
  const GrayscaleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Consumer<GrayscaleModel>(builder: (context, isGray, child) {
      return MaterialApp(
        title: 'Grayscale Demo',
        theme: ThemeData(
          brightness: Brightness.light,
          colorScheme: GrayColorScheme.highContrastGray(Brightness.light),
        ),
        darkTheme: ThemeData(
          brightness: Brightness.dark,
          colorScheme: GrayColorScheme.highContrastGray(Brightness.dark),
        ),
        themeMode: ThemeMode.system,
        home: const HomePage(title: 'Grayscale Demo'),
      );
    });
  }
}
const like = 'sample';
1
likes
150
pub points
47%
popularity

Publisher

verified publishercuzira.dev

Create grayscale color schemes in Flutter easily with this library. Convert ColorScheme and Color objects to grayscale effortlessly.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on grayscale