Skip to content
pubscout

hexcolor

3.1.3, released 8 months ago by an unverified publisher

Add hex color codes and convert material colors to hex in Dart and Flutter.

WASM-ready
$ flutter pub add hexcolor
Source repository

What it does

Allows developers to instantiate Flutter Color objects using hexadecimal string codes (such as #009688) and provides an extension to convert material colors to hex strings.

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

Use it when

  • You need to define colors using hex strings in Flutter projects
  • You want to convert existing Material Color instances into hex strings

Skip it when

  • You prefer using standard Flutter hex color notation (e.g., 0xFF009688) without an external package

Strengths

  • Simple API for hex string color parsing
  • Supports converting Material colors to hex strings via extension

Weaknesses

  • Redundant with native Flutter color initialization (Color(0xFF...))

Setup

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

Text("Hello There!", style: TextStyle(color: HexColor("#009688")));

Alternatives

Packages that do the same job and could replace hexcolor.