PColor class abstract
A PCanvas color.
- Implemented types
- Implementers
- 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 - 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 is0.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
-
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
ascolor
and optional parametersize
. -
withAlpha(
double alpha) → PColorRGB
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
- colorBlack → PColorRGB
-
final
- colorBlackAlpha50 → PColorRGB
-
final
- colorBlue → PColorRGB
-
final
- colorGreen → PColorRGB
-
final
- colorGrey → PColorRGB
-
final
- colorGreyAlpha50 → PColorRGB
-
final
- colorGreyDark1 → PColorRGB
-
final
- colorGreyDark2 → PColorRGB
-
final
- colorGreyLight1 → PColorRGB
-
final
- colorGreyLight2 → PColorRGB
-
final
- colorPink → PColorRGB
-
final
- colorRed → PColorRGB
-
final
- colorTransparent → PColorRGB
-
final
- colorWhite → PColorRGB
-
final
- colorYellow → PColorRGB
-
final