from_css_color 1.0.0
from_css_color: ^1.0.0

Flutter Android iOS web

Creates Color instance from CSS color string according to https://drafts.csswg.org/css-color-3

From CSS Color #

A package that creates Flutter Color instances from CSS color strings according to https://drafts.csswg.org/css-color-3. Hex, RGB(A), HSL(A) and X11 keywords are supported.

Usage #

To use this plugin, add from_css_color as a dependency in your pubspec.yaml file.

Example #

Import the library.

import 'package:from_css_color/from_css_color.dart';

Use it anywhere you want to create a Color from CSS color definition format:

Container(
  color: fromCSSColor('#ff00aa'),
  // ...
)

Container(
  color: fromCSSColor('rgb(100, 5, 32)'),
  // ...
)

Visit examples for more details.

2
likes
110
pub points
74%
popularity

Creates Color instance from CSS color string according to https://drafts.csswg.org/css-color-3

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

alex.myznikov.post@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on from_css_color