setalpha 0.9.0 copy "setalpha: ^0.9.0" to clipboard
setalpha: ^0.9.0 copied to clipboard

outdated

A convenience package for setting and accessing web colors, adjusting the alpha levels of given colors and mixing new colors.

example/example.dart

import 'package:setalpha/setalpha.dart';

void main() {
  // Get cornflowerblue with an alpha value of 0.3...
  print(setAlpha(Color.cornflowerBlue, 0.3));
  // #6495ed4d

  // Also works for other hex and hsl expressions...
  print(setAlpha("#add8e6", 0.5));
  // #add8e680

  print(setAlpha("hsl(195, 53%, 79%)", 0.5));
  // #add8e680

  // Which web color is nearest 30, 60, 120 in RGB-space?
  print(colorNearestRGB(30, 60, 120));
  // midnightblue

  // Let's mix 3 parts cornflowerblue with 2 parts maroon...
  print(colorMix([Color.cornflowerBlue, Color.maroon], [3, 2]));
  // #6f598eff
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A convenience package for setting and accessing web colors, adjusting the alpha levels of given colors and mixing new colors.

Homepage

License

unknown (LICENSE)

More

Packages that depend on setalpha