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(),
)

Libraries

color_shade