ColorExtension extension

Extension on the Color class to provide additional functionality.

on

Properties

alphaValue int

Available on Color, provided by the ColorExtension extension

Returns the alpha component of the color.
no setter
blueValue int

Available on Color, provided by the ColorExtension extension

Returns the blue component of the color.
no setter
brightness double

Available on Color, provided by the ColorExtension extension

Returns the brightness of the color.
no setter
greenValue int

Available on Color, provided by the ColorExtension extension

Returns the green component of the color.
no setter
hex String

Available on Color, provided by the ColorExtension extension

Returns the hex value of the color.
no setter
redValue int

Available on Color, provided by the ColorExtension extension

Returns the red component of the color.
no setter

Methods

darken([int percent = 10]) Color

Available on Color, provided by the ColorExtension extension

Darkens the color by a specified percentage.
fromHex(String hexString) Color

Available on Color, provided by the ColorExtension extension

Hex Color from a String to a Color object.
lighten([int percent = 10]) Color

Available on Color, provided by the ColorExtension extension

Lightens the color by a specified percentage.
withAlpha(int alpha) Color

Available on Color, provided by the ColorExtension extension

Returns a new Color object with the specified alpha value.
withBlue(int blue) Color

Available on Color, provided by the ColorExtension extension

Returns a new Color object with the specified blue value.
withBrightness(double brightness) Color

Available on Color, provided by the ColorExtension extension

Returns a new Color object with the specified brightness value.
withGreen(int green) Color

Available on Color, provided by the ColorExtension extension

Returns a new Color object with the specified green value.
withRed(int red) Color

Available on Color, provided by the ColorExtension extension

Returns a new Color object with the specified red value.