flutter_tailwind_colors 0.0.2 copy "flutter_tailwind_colors: ^0.0.2" to clipboard
flutter_tailwind_colors: ^0.0.2 copied to clipboard

Tailwind CSS Colors

flutter_tailwind_colors #

Tailwind CSS 3 Colors

Dart package exposing Tailwind Colors to be used in flutter in a way similar to the Material colors.

Installation #

  1. Add to your pubspec.yaml file:
dependencies:
    tailwind_colors: ^0.0.2
  1. Get the package via your IDE or via the command line by typing:
$ pub get
  1. Import the flutter_tailwind_colors package
import 'package:flutter_tailwind_colors/flutter_tailwind_colors.dart';

How to Use #

Tailwind Colors can be created and used in the same way as the usual Material color palette.

    // TWColors has shades starting from 100 up to 900 in increment of 100
    Color primaryColor = TWColors.emerald.shade100;
    Color secondColor = TWColors.rose.shade900;

TWColors features:

  • slate
  • gray
  • zinc
  • neutral
  • stone
  • red
  • orange
  • amber
  • yellow
  • lime
  • green
  • emerald
  • teal
  • cyan
  • sky
  • blue
  • indigo
  • violet
  • purple
  • pink
  • rose

TWColors features the Tailwind 3.0 color palette:

Use as a theme #

Every colors from the TWColors palettes can be used.

return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: TWColors.emrald,
      ),
      home: MyHomePage(
          title: 'Flutter Demo Home Page',
      ),
    );