PdfColor class

Represents an RGB color

Implementers

Constructors

PdfColor(double red, double green, double blue, [double alpha = 1.0])
Create a color with red, green, blue and alpha components values between 0 and 1
const
PdfColor.fromHex(String color)
Can parse colors in the form:
factory
PdfColor.fromInt(int color)
Return a color with: 0xAARRGGBB
const
PdfColor.fromRYB(double red, double yellow, double blue, [double alpha = 1.0])
Load an RGB color from a RYB color
factory

Properties

alpha double
Opacity
final
analagous List<PdfColor>
Returns a list of analagous colors
no setter
blue double
Blue component
final
complementary PdfColor
Get a complementary color with hue shifted by -120°
no setter
green double
Green component
final
hashCode int
The hash code for this object.
no setteroverride
isDark bool
Determines whether the given PdfColor is dark.
no setter
isLight bool
Determines whether the given PdfColor is light.
no setter
luminance double
Get the luminance
no setter
monochromatic List<PdfColor>
Get some similar colors
no setter
red double
Red component
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splitcomplementary List<PdfColor>
Returns a list of complementary colors
no setter
tetradic List<PdfColor>
Returns a list of tetradic colors
no setter
triadic List<PdfColor>
Returns a list of triadic colors
no setter

Methods

flatten({PdfColor background = const PdfColor(1, 1, 1)}) PdfColor
Apply the color transparency by updating the color values according to a background color.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shade(double strength) PdfColor
Build a Material Color shade using the given strength.
toCmyk() PdfColorCmyk
Convert this color to CMYK
toHex() String
Get an Hexadecimal representation of this color
toHsl() PdfColorHsl
Convert this color to HSL
toHsv() PdfColorHsv
Convert this color to HSV
toInt() int
Get the int32 representation of this color
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override