PColorRGB class

Inheritance
Available extensions

Constructors

PColorRGB(int r, int g, int b)
PColorRGB.fromBGR(int p)
PColorRGB.fromHSV(double h, double s, double v, {double? alpha})
factory
PColorRGB.fromJson(Map<String, dynamic> j)
factory
PColorRGB.fromRGB(int p)
PColorRGB.fromRGBA(int p)

Properties

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

Available on PColor, provided by the PColorExtension extension

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

Methods

copyWith({int? r, int? g, int? b, double? alpha}) → PColorRGB
override
darker(double ratio) → PColor
Returns a darker color.
inherited
distanceA(PColorRGB other) → int
distanceB(PColorRGB other) → int
distanceG(PColorRGB other) → int
distanceR(PColorRGB other) → int
lighter(double ratio) → PColor
Returns a lighter color.
inherited
maxDistance(PColorRGB other) → int
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.
override
toPColorRGBA() → PColorRGBA
Converts this instances to a PColorRGBA.
override
toRGB() → String
Converts to the RGB format.
override
toRGBA() → String
Converts to the RGBA format.
override
toString() → String
A string representation of this object.
override
toStyle({int? size}) → PStyle
Returns a PStyle using this as color and optional parameter size.
override
withAlpha(double alpha) → PColorRGB
inherited

Operators

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