pigment
1.0.4, released 6 years ago by an unverified publisher
Parse string colors into Flutter Color objects
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.
- flex_color_scheme
Builds matched light and dark ThemeData for Flutter with Material design themes and seed colors.
89Compare - hugeicons
6,000+ free stroke-rounded SVG icons for Flutter with custom stroke width and color inheritance.
89Compare - material_color_utilities
Algorithms and utilities for the Material Design 3 color system.
86Compare - dynamic_color
Create Material color schemes based on a platform's implementation of dynamic color.
83Compare
Works with
Packages commonly used together with pigment: ones it builds on, ones built on it, and its own family.