fff 1.0.0 copy "fff: ^1.0.0" to clipboard
fff: ^1.0.0 copied to clipboard

outdatedDart 1 only

Dart package for convenient work with color. It will allow you to convert colors between rgb, rgba and hex formats. Also it can parse color from strings specified formats and from list of color compon [...]

example/main.dart

import 'package:fff/color.dart';
import 'package:fff/parser.dart';

main() {
  // Create color object from hex-string
  Color color = ColorParser('#afa43e');

  // get color components
  print(color.red); // 175
  print(color.green); // 164
  print(color.blue); // 62

  // output color as string
  print(color.toHexString()); // afa43e
  print(color.toRgbString('[%r, %G, %b]')); // rgb(175, 164, 62)
  print(color.toRgbaString()); // rgba(175, 164, 62, 1.0)
  print(color.toString()); // rgb(175, 164, 62)s
  print(color.toHexString('#%R%G%B')); // #AFA43E
}
2
likes
0
pub points
67%
popularity

Publisher

verified publisherdev.vihtor.ru

Dart package for convenient work with color. It will allow you to convert colors between rgb, rgba and hex formats. Also it can parse color from strings specified formats and from list of color components or map.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on fff