PaintExtension extension
- on
Methods
-
brighten(
double amount) → void -
Available on Paint, provided by the PaintExtension extension
Brighten the shade of the Color in the Paint object by theamount
. -
darken(
double amount) → void -
Available on Paint, provided by the PaintExtension extension
Darken the shade of the Color in the Paint object by theamount
.
Static Methods
-
fromARGBHexString(
String hexString) → Paint -
Available on Paint, provided by the PaintExtension extension
Parses an ARGB color from a valid hex string (e.g. #1C1C1C). -
fromRGBHexString(
String hexString) → Paint -
Available on Paint, provided by the PaintExtension extension
Parses an RGB color from a valid hex string (e.g. #1C1C1C). -
random(
{double withAlpha = 1.0, int base = 0, Random? rng}) → Paint -
Available on Paint, provided by the PaintExtension extension
Generates a random Color in a new Paint object with the set alpha aswithAlpha
or the default (1.0). You can pass in a random number generatorrng
, if omitted the function will create a new Random object without a seed and use that.base
can be used to get the random colors in only a lighter spectrum, it should be between 0 and 256.