ColorIntExtension extension
Extension on int to provide easy access and manipulation of ARGB colors represented as 32-bit integers.
- on
Properties
- a → int
-
Available on int, provided by the ColorIntExtension extension
Extract the alpha channel (0-255).no setter - ansiIndex → int
-
Available on int, provided by the ColorIntExtension extension
The ANSI palette index (0..255) when isAnsiIndexed istrue.no setter - b → int
-
Available on int, provided by the ColorIntExtension extension
Extract the blue channel (0-255).no setter - effectiveAlpha → int
-
Available on int, provided by the ColorIntExtension extension
Effective alpha (255for isAnsiIndexed values, otherwise a).no setter - g → int
-
Available on int, provided by the ColorIntExtension extension
Extract the green channel (0-255).no setter - isAnsiIndexed → bool
-
Available on int, provided by the ColorIntExtension extension
Whether this packed color integer represents an indexed ANSI slot (0..255).no setter - isTransparent → bool
-
Available on int, provided by the ColorIntExtension extension
Returns true if this color is fully transparent (alpha == 0 and not isAnsiIndexed).no setter - r → int
-
Available on int, provided by the ColorIntExtension extension
Extract the red channel (0-255).no setter
Methods
-
ansiSgrParams(
{required bool background}) → String -
Available on int, provided by the ColorIntExtension extension
Returns the SGR parameter segment for an isAnsiIndexed color (30..37,90..97,38;5;nfor foreground;40..47,100..107,48;5;nfor background). -
withAlpha(
int a) → int -
Available on int, provided by the ColorIntExtension extension
Returns a new ARGB integer with the updated alpha value (0-255). -
withBlue(
int b) → int -
Available on int, provided by the ColorIntExtension extension
Returns a new ARGB integer with the updated blue value (0-255). -
withGreen(
int g) → int -
Available on int, provided by the ColorIntExtension extension
Returns a new ARGB integer with the updated green value (0-255). -
withRed(
int r) → int -
Available on int, provided by the ColorIntExtension extension
Returns a new ARGB integer with the updated red value (0-255).