PColor class abstract

A PCanvas color.

Implemented types
Available extensions

Constructors

PColor()
PColor.fromJson(Map<String, dynamic> j)
factory

Properties

abgrInt → int
This color in ABGR format.
no setter
alpha → double
The alpha of this color.
no setter
argbInt → int
This color in ARGB format.
no setter
asColor → Color

Available on PColor, provided by the PColorExtension extension

no setter
className → String
no setterinherited
hasAlpha → bool
Returns true if this color has alpha.
no setter
hashCode → int
The hash code for this object.
no setteroverride
hsv → ({double h, double s, double v})
Returns a HSV record.
no setter
hsva → ({double a, double h, double s, double v})
Returns a HSVA record.
no setter
isFullyTransparent → bool
Returns true if this color alpha is 0.0.
no setter
rgb → ({int b, int g, int r})
Returns a RGB record.
no setter
rgba → ({double a, int b, int g, int r})
Returns a RGBA record.
no setter
rgbaInt → int
This color in RGBA format.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? r, int? g, int? b, double? alpha}) → PColorRGB
darker(double ratio) → PColor
Returns a darker color.
lighter(double ratio) → PColor
Returns a lighter color.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
override
toJsonEncoded({bool pretty = false}) → String

Available on WithJson, provided by the WithJsonExtension extension

toPColorRGB() → PColorRGB
Converts this instances to a PColorRGB.
toPColorRGBA() → PColorRGBA
Converts this instances to a PColorRGBA.
toRGB() → String
Converts to the RGB format.
toRGBA() → String
Converts to the RGBA format.
toString() → String
A string representation of this object.
override
toStyle({int? size}) → PStyle
Returns a PStyle using this as color and optional parameter size.
withAlpha(double alpha) → PColorRGB

Operators

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

Static Methods

from(Object? o) → PColor?