Skip to content
pubscout

eo_color

2.2.3, released 2 years ago by dartoos.dev

Object-oriented API for Material Design color palettes and swatches

WASM-ready
$ flutter pub add eo_color
Source repository

What it does

Provides classes such as Blue(), Grey.light(), and Swatch collections to retrieve Material Design colors in a readable, declarative way. It replaces Flutter’s numeric index system with named constructors and adverbs.

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

Use it when

  • You want a more readable way to pick Material Design colors
  • You need to build a custom color package or theme
  • You prefer object-oriented APIs over static color maps

Skip it when

  • You need the absolute smallest dependency footprint
  • You are targeting a very old Flutter SDK that doesn’t support null safety

Strengths

  • Readable, declarative API
  • Full coverage of Material Design palettes and accents
  • Supports swatches and gradients
  • No code generation required

Weaknesses

  • Only covers Material Design colors
  • No support for custom color palettes out of the box

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
```dart
import 'package:eo_color/eo_color.dart';

Widget build(BuildContext context) {
  return Container(color: const Blue().color);
}
```

Alternatives

Packages that do the same job and could replace eo_color.