hex_to_color_plus 1.0.0+5 copy "hex_to_color_plus: ^1.0.0+5" to clipboard
hex_to_color_plus: ^1.0.0+5 copied to clipboard

Convert hex strings to Color objects in Flutter, including ARGB formats with alpha transparency.

Hex Color Plus #

A Flutter plugin to convert hex string values into Color objects—supporting both standard 6-digit hex codes (#RRGGBB) and extended 8-digit hex codes with alpha transparency (#AARRGGBB).

🎨 Whether you're working with basic hex like #FFFFFF or want fine control with #80FFAA33, HexColorPlus makes it simple and flexible.


✨ Features #

  • Convert hex string (#RRGGBB) to Color ✔️
  • Support 8-digit ARGB hex (#AARRGGBB) for alpha channel ✔️
  • Graceful fallback in case of invalid hex input ✔️
  • Works seamlessly with Flutter's Color class ✔️

🔧 Installation #

Add this to your pubspec.yaml:

dependencies:
  hex_color_plus: ^1.0.0


🚀 Usage #

Import and use in your Dart code:

import 'package:hex_color_plus/hex_color_plus.dart';

void main() {
  // Convert standard 6-digit hex (RRGGBB)
  Color basic = HexColor.hexToColor("#FFAA88");

  // Convert extended 8-digit hex with alpha (AARRGGBB)
  Color withAlpha = HexColor.hexToColor("#88FFAA00");

  print(basic);
  print(withAlpha);
}

✅ Supported formats: #

#RRGGBB → basic opaque colors

#AARRGGBB → colors with alpha transparency


📜 License #

This plugin is licensed under the MIT License.

0
likes
150
points
1
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Convert hex strings to Color objects in Flutter, including ARGB formats with alpha transparency.

Homepage

License

MIT (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on hex_to_color_plus