Skip to content
pubscout

enhanced_gradients

2.0.0+1, released 9 months ago by leancode.co

Flutter gradient wrappers that interpolate colors in the HCT color system.

WASM-ready
$ flutter pub add enhanced_gradients
Source repository

What it does

Provides enhanced versions of LinearGradient, RadialGradient, and SweepGradient that interpolate colors using the HCT color system rather than standard RGB. It also includes an HctColorTween for color transitions in Flutter animations.

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

Use it when

  • You want smoother or more perceptually accurate color transitions in gradients.
  • You are already using Material color utilities and want HCT-based animations or tweens.

Skip it when

  • You require standard RGB or HSL color interpolation for specific design guidelines.
  • You are using a Flutter version older than 3.27.0.

Strengths

  • Easy to use via wrapper classes or extension methods.
  • Includes a custom HctColorTween for animations.

Weaknesses

  • HCT results are subjective and might not always look better than regular gradients depending on the effect.
  • Requires a relatively recent minimum Flutter version (3.27.0).

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
LinearGradient(
  colors: const [Color(0xFF000000), Color(0xFFFFFFFF)],
).enhanced()

Alternatives

Packages that do the same job and could replace enhanced_gradients.

  • c_material

    Provides a large set of predefined Color constants and Material 3 theming utilities for Flutter.

  • derived_colors

    Generate color variants and modifications for Flutter applications.

  • color_mesh

    A multi-point mesh gradient that extends Gradient and can be used in decorations and animations.

  • pigment

    Parse string colors into Flutter Color objects

Works with

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