ColorExtension extension

Extension on the Color class to provide additional functionality.

on

Properties

alphaValue int
Returns the alpha component of the color.
no setter
blueValue int
Returns the blue component of the color.
no setter
brightness double
Returns the brightness of the color.
no setter
greenValue int
Returns the green component of the color.
no setter
hex String
Returns the hex value of the color.
no setter
redValue int
Returns the red component of the color.
no setter

Methods

darken([int percent = 10]) Color
Darkens the color by a specified percentage.
fromHex(String hexString) Color
Hex Color from a String to a Color object.
lighten([int percent = 10]) Color
Lightens the color by a specified percentage.
withAlpha(int alpha) Color
Returns a new Color object with the specified alpha value.
withBlue(int blue) Color
Returns a new Color object with the specified blue value.
withBrightness(double brightness) Color
Returns a new Color object with the specified brightness value.
withGreen(int green) Color
Returns a new Color object with the specified green value.
withRed(int red) Color
Returns a new Color object with the specified red value.