Skip to content
pubscout

pigment

1.0.4, released 6 years ago by an unverified publisher

Parse string colors into Flutter Color objects

WASM-ready
$ flutter pub add pigment
Source repository

What it does

Pigment provides a simple API to convert hex, rgb, and CSS color names into Flutter Color instances. It extends the Color class so all Color methods are available.

AI-written summary of version 1.0.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to use string literals for colors in your UI
  • You want quick conversion of CSS named colors
  • You want a lightweight dependency for color parsing

Skip it when

  • You need advanced color manipulation or theming engines
  • You require a full-featured color picker widget

Strengths

  • Zero external dependencies
  • Supports hex, rgb, and CSS names
  • Extends Color for full API access

Weaknesses

  • No documentation beyond README
  • No tests or changelog details
  • Limited to parsing only

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add pigment to pubspec.yaml and import package:pigment/pigment.dart

import 'package:pigment/pigment.dart';

final color = Pigment.fromString('#FE5567');

Alternatives

Packages that do the same job and could replace pigment.

Works with

Packages commonly used together with pigment: ones it builds on, ones built on it, and its own family.