color_convert 2.0.0 copy "color_convert: ^2.0.0" to clipboard
color_convert: ^2.0.0 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]

  final rgbChannels = convert.rgb.channels; // 3
  final cmykChannels = convert.cmyk.channels; // 4
  final ansiChannels = convert.ansi16.channels; // 1

  print(rgbChannels);
  print(cmykChannels);
  print(ansiChannels);
}
9
likes
40
points
18
downloads

Publisher

verified publishernexo.sh

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