Skip to content
pubscout

derived_colors

0.4.0, released 4 years ago by aloisdeniel.com

Generate color variants and modifications for Flutter applications.

WASM-ready
$ flutter pub add derived_colors
Source repository

What it does

The derived_colors package allows you to generate color variants such as light, dark, and inverted colors, as well as subtle color adjustments. It uses extensions on Color to calculate these variants inspired by Bulma calculations.

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

Use it when

  • You need to dynamically generate light and dark variants of a given color.
  • You want to create hover or subtle color shades easily in your UI.

Skip it when

  • You require complex design-system token management engines beyond basic color calculation.
  • You need strict custom design palettes defined entirely manually without algorithmic generation.

Strengths

  • Provides simple extensions on Color for fast variant generation.
  • Includes caching with WeakReference for improved performance.
  • Supports multiple platforms including Android, iOS, Web, Windows, macOS, and Linux.

Weaknesses

  • Limited set of algorithms primarily inspired by Bulma calculations.
  • No extensive theming architecture or configuration options documented.

Setup

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

final color = Color(0xFFFF0000);
final light = color.variants.light;
final dark = color.variants.dark;
final invert = color.variants.invert;

final hoverColor = color.subtle();

Alternatives

Packages that do the same job and could replace derived_colors.