PdfColor class
Represents an RGB color.
- Implementers
Constructors
- PdfColor(double red, double green, double blue, [double alpha = 1.0])
-
Creates a color with red, green, blue and alpha components in 0..1.
const
- PdfColor.fromHex(String color)
-
Can parse colors in the form:
factory
- PdfColor.fromInt(int color)
-
Creates a color from a 0xAARRGGBB integer.
const
- PdfColor.fromRgbInt(int red, int green, int blue, [int alpha = 255])
-
Convenience for RGB values in 0..255 (alpha in 0..255).
factory
- PdfColor.fromRYB(double red, double yellow, double blue, [double alpha = 1.0])
-
Creates an RGB color from RYB components.
factory
Properties
- alpha → double
-
Opacity component.
final
-
analagous
→ List<
PdfColor> -
Returns analogous colors.
no setter
- blue → double
-
Blue component.
final
- complementary → PdfColor
-
Returns 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
-
Returns the relative luminance.
no setter
-
monochromatic
→ List<
PdfColor> -
Returns 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 complementary colors.
no setter
-
tetradic
→ List<
PdfColor> -
Returns tetradic colors.
no setter
-
triadic
→ List<
PdfColor> -
Returns 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 - Converts this color to CMYK.
-
toHex(
) → String - Returns a hexadecimal representation (#RRGGBBAA).
-
toHsl(
) → PdfColorHsl - Converts this color to HSL.
-
toHsv(
) → PdfColorHsv - Converts this color to HSV.
-
toInt(
) → int - Returns the 32-bit integer representation (0xAARRGGBB).
-
toString(
) → String -
A string representation of this object.
override
-
withAlpha(
double alpha) → PdfColor - Returns a copy with a different alpha value.
-
withBlue(
double blue) → PdfColor - Returns a copy with a different blue value.
-
withGreen(
double green) → PdfColor - Returns a copy with a different green value.
-
withRed(
double red) → PdfColor - Returns a copy with a different red value.
-
withValues(
double? alpha, double? red, double? green, double? blue) → PdfColor - Returns a copy with different component values.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override