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';
4
likes
150
points
7
downloads

Publisher

verified publishercuzira.dev

Weekly Downloads

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

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on grayscale