supports_color 0.1.1

  • Installing
  • Versions
  • 1

supports_color pub package Build Status

Detect whether the current terminal supports color.

This is a dart port of the npm supports-color package.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  supports_color: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:supports_color/supports_color.dart';
Version Uploaded Documentation Archive
0.1.1 Oct 17, 2014 Go to the documentation of supports_color 0.1.1 Download supports_color 0.1.1 archive
0.1.0 Oct 16, 2014 Go to the documentation of supports_color 0.1.0 Download supports_color 0.1.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Health suggestions

Format lib/src/supports_color.dart.

Run dartfmt to format lib/src/supports_color.dart.

Format lib/supports_color.dart.

Run dartfmt to format lib/supports_color.dart.

Maintenance issues and suggestions

Add SDK constraint in pubspec.yaml. (-50 points)

For information about setting SDK constraint, please see

Package is too old. (-100 points)

The package was released more than two years ago.

Maintain (-20 points)

Changelog entries help clients to follow the progress in your code.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use supports_color.dart.


Package Constraint Resolved Available
Dev dependencies
unittest >=0.11.0 <0.12.0