color_shade 1.0.1 copy "color_shade: ^1.0.1" to clipboard
color_shade: ^1.0.1 copied to clipboard

Extends the Color class to generate shades from the primary color.

color_shade #

Pub dev Coverage Status

Overview #

A package that extends the Color class to generate shades from the primary color.

Usage #

To use it, just import the package and the shades will already be available

import 'package:color_shade/color_shade.dart';

Color(0xFFFFEB3B).shade700;

It is possible to access tones from 50 to 900, the same as the Colors.yellow of the material, for example

  const primaryColor = Color(0xFFFFEB3B);
  primaryColor.shade50;
  primaryColor.shade100;
  primaryColor.shade200;
  primaryColor.shade300;
  primaryColor.shade400;
  primaryColor.shade500;
  primaryColor.shade600;
  primaryColor.shade700;
  primaryColor.shade800;
  primaryColor.shade900;

It is possible also pass the Color(0xFFFFEB3B).swatch to the ThemeData

MaterialApp(
  title: 'ColorShade Demo',
  theme: ThemeData(
    primarySwatch: const Color(0xFFFFEB3B).swatch,
  ),
  home: HomePage(),
)
2
likes
150
points
32
downloads

Publisher

verified publisherfelipe.li

Weekly Downloads

Extends the Color class to generate shades from the primary color.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on color_shade