color_convert 1.0.2 copy "color_convert: ^1.0.2" to clipboard
color_convert: ^1.0.2 copied to clipboard

A color conversion library for Dart. It converts all ways between rgb, hsl, hsv, hwb, cmyk, ansi, ansi16, hex strings, and CSS keywords (will round to closest).

example/color_convert_example.dart

import 'package:color_convert/color_convert.dart';

void main() {
  convert.rgb.hsl(140, 200, 100); // [96, 48, 59]
  convert.keyword.rgb('blue'); // [0, 0, 255]

  var rgbChannels = convert.rgb.channels; // 3
  var cmykChannels = convert.cmyk.channels; // 4
  var ansiChannels = convert.ansi16.channels; // 1
}
8
likes
40
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

A color conversion library for Dart. It converts all ways between rgb, hsl, hsv, hwb, cmyk, ansi, ansi16, hex strings, and CSS keywords (will round to closest).

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on color_convert