Class representing a color, based on Int. Provides a variety of methods for creating and converting colors.

FlxColors can be written as Ints. This means you can pass a hex value such as 0xff123456 to a function expecting a FlxColor, and it will automatically become a FlxColor "object". Similarly, FlxColors may be treated as Ints.

Note that when using properties of a FlxColor other than ARGB, the values are ultimately stored as ARGB values, so repeatedly manipulating HSB/HSL/CMYK values may result in a gradual loss of precision.

@author Joe Williamson (JoeCreates)

Constructor

@:value({ Value : 0 })@:implnew(Value:Int = 0)

Variables

@:impllightness:Float

The lightness of the color (from 0 to 1)

@:implbrightness:Float

The brightness (aka value) of the color (from 0 to 1)

@:implsaturation:Float

The saturation of the color (from 0 to 1)

@:implhue:Float

The hue of the color in degrees (from 0 to 359)

@:implblack:Float

@:implcyan:Float

@:implalpha:Int

@:implgreen:Int

@:implblue:Int

@:implred:Int

Methods

@:implinlinesetHSL(Hue:Float, Saturation:Float, Lightness:Float, Alpha:Float):FlxColor

Set HSL components.

Parameters:

Hue

A number between 0 and 360, indicating position on a color strip or wheel.

Saturation

A number between 0 and 1, indicating how colorful or gray the color should be. 0 is gray, 1 is vibrant.

Lightness

A number between 0 and 1, indicating the lightness of the color

Alpha

How opaque the color should be, either between 0 and 1 or 0 and 255

Returns:

This color

@:implinlinesetHSB(Hue:Float, Saturation:Float, Brightness:Float, Alpha:Float):FlxColor

Set HSB (aka HSV) components

Parameters:

Hue

A number between 0 and 360, indicating position on a color strip or wheel.

Saturation

A number between 0 and 1, indicating how colorful or gray the color should be. 0 is gray, 1 is vibrant.

Brightness

(aka Value) A number between 0 and 1, indicating how bright the color should be. 0 is black, 1 is full bright.

Alpha

How opaque the color should be, either between 0 and 1 or 0 and 255.

Returns:

This color

@:value({ Alpha : 1 })@:implinlinesetCMYK(Cyan:Float, Magenta:Float, Yellow:Float, Black:Float, Alpha:Float = 1):FlxColor

Set CMYK values as floats (0 to 1)

Parameters:

Cyan

The cyan value of the color from 0 to 1

Magenta

The magenta value of the color from 0 to 1

Yellow

The yellow value of the color from 0 to 1

Black

The black value of the color from 0 to 1

Alpha

How opaque the color should be, from 0 to 1

Returns:

This color

@:value({ Alpha : 1 })@:implinlinesetRGBFloat(Red:Float, Green:Float, Blue:Float, Alpha:Float = 1):FlxColor

Set RGB values as floats (0 to 1)

Parameters:

Red

The red value of the color from 0 to 1

Green

The green value of the color from 0 to 1

Blue

The green value of the color from 0 to 1

Alpha

How opaque the color should be, from 0 to 1

Returns:

This color

@:value({ Alpha : 255 })@:implinlinesetRGB(Red:Int, Green:Int, Blue:Int, Alpha:Int = 255):FlxColor

Set RGB values as integers (0 to 255)

Parameters:

Red

The red value of the color from 0 to 255

Green

The green value of the color from 0 to 255

Blue

The green value of the color from 0 to 255

Alpha

How opaque the color should be, from 0 to 255

Returns:

This color

@:implinlinegetInverted():FlxColor

Get the inversion of this color

Returns:

The inversion of this color

@:value({ Factor : 0.2 })@:implinlinegetLightened(Factor:Float = 0.2):FlxColor

Get a lightened version of this color

Parameters:

Factor

Value from 0 to 1 of how much to progress toward white.

Returns:

A lightened version of this color

@:value({ Factor : 0.2 })@:implgetDarkened(Factor:Float = 0.2):FlxColor

Get a darkened version of this color

Parameters:

Factor

Value from 0 to 1 of how much to progress toward black.

Returns:

A darkened version of this color

@:implgetColorInfo():String

Get a string of color information about this color

Returns:

A string containing information about this color

@:implinlinetoWebString():String

Return a String representation of the color in the format #RRGGBB

Returns:

A string of length 7 in the format #RRGGBB

@:value({ Prefix : true, Alpha : true })@:implinlinetoHexString(Alpha:Bool = true, Prefix:Bool = true):String

Return a String representation of the color in the format

Parameters:

Alpha

Whether to include the alpha value in the hes string

Prefix

Whether to include "0x" prefix at start of string

Returns:

A string of length 10 in the format 0xAARRGGBB

@:implinlineto24Bit():FlxColor

Return a 24 bit version of this color (i.e. without an alpha value)

Returns:

A 24 bit version of this color

@:implinlinegetTriadicHarmony():TriadicHarmony

Returns a Triadic Color Harmony for this color. A Triadic harmony are 3 hues equidistant from each other on the color wheel.

Returns:

Object containing 3 properties: color1 (the original color), color2 and color3 (the equidistant colors)

@:value({ Threshold : 30 })@:implinlinegetSplitComplementHarmony(Threshold:Int = 30):Harmony

Returns an Split Complement Color Harmony for this color. A Split Complement harmony are the two hues on either side of the color's Complement

Parameters:

Threshold

Control how adjacent the colors will be to the Complement (default +- 30 degrees)

Returns:

Object containing 3 properties: original (the original color), warmer (the warmer analogous color) and colder (the colder analogous color)

@:value({ Threshold : 30 })@:implinlinegetAnalogousHarmony(Threshold:Int = 30):Harmony

Returns an Analogous Color Harmony for the given color. An Analogous harmony are hues adjacent to each other on the color wheel

Parameters:

Threshold

Control how adjacent the colors will be (default +- 30 degrees)

Returns:

Object containing 3 properties: original (the original color), warmer (the warmer analogous color) and colder (the colder analogous color)

@:implinlinegetComplementHarmony():FlxColor

Returns a Complementary Color Harmony of this color. A complementary hue is one directly opposite the color given on the color wheel

Returns:

The complimentary color

Static variables

@:value(FlxMacroUtil.buildMap("flixel.util.FlxColor"))staticread onlycolorLookup:Map<String, Int> = FlxMacroUtil.buildMap("flixel.util.FlxColor")

A Map<String, Int> whose values are the static colors of FlxColor. You can add more colors for FlxColor.fromString(String) if you need.

@:value(0xFF00FFFF)staticinlineread onlyCYAN:FlxColor = 0xFF00FFFF

@:value(0xFFFF00FF)staticinlineread onlyMAGENTA:FlxColor = 0xFFFF00FF

@:value(0xFFFFC0CB)staticinlineread onlyPINK:FlxColor = 0xFFFFC0CB

@:value(0xFF8B4513)staticinlineread onlyBROWN:FlxColor = 0xFF8B4513

@:value(0xFF0000FF)staticinlineread onlyBLUE:FlxColor = 0xFF0000FF

@:value(0xFF800080)staticinlineread onlyPURPLE:FlxColor = 0xFF800080

@:value(0xFFFF0000)staticinlineread onlyRED:FlxColor = 0xFFFF0000

@:value(0xFFFFA500)staticinlineread onlyORANGE:FlxColor = 0xFFFFA500

@:value(0xFFFFFF00)staticinlineread onlyYELLOW:FlxColor = 0xFFFFFF00

@:value(0xFF00FF00)staticinlineread onlyLIME:FlxColor = 0xFF00FF00

@:value(0xFF008000)staticinlineread onlyGREEN:FlxColor = 0xFF008000

@:value(0xFF000000)staticinlineread onlyBLACK:FlxColor = 0xFF000000

@:value(0xFF808080)staticinlineread onlyGRAY:FlxColor = 0xFF808080

@:value(0xFFFFFFFF)staticinlineread onlyWHITE:FlxColor = 0xFFFFFFFF

@:value(0x00000000)staticinlineread onlyTRANSPARENT:FlxColor = 0x00000000

@:value(0x00000000)staticinlineread onlyTRANSPARENT:FlxColor = 0x00000000

@:value(0xFFFFFFFF)staticinlineread onlyWHITE:FlxColor = 0xFFFFFFFF

@:value(0xFF808080)staticinlineread onlyGRAY:FlxColor = 0xFF808080

@:value(0xFF000000)staticinlineread onlyBLACK:FlxColor = 0xFF000000

@:value(0xFF008000)staticinlineread onlyGREEN:FlxColor = 0xFF008000

@:value(0xFF00FF00)staticinlineread onlyLIME:FlxColor = 0xFF00FF00

@:value(0xFFFFFF00)staticinlineread onlyYELLOW:FlxColor = 0xFFFFFF00

@:value(0xFFFFA500)staticinlineread onlyORANGE:FlxColor = 0xFFFFA500

@:value(0xFFFF0000)staticinlineread onlyRED:FlxColor = 0xFFFF0000

@:value(0xFF800080)staticinlineread onlyPURPLE:FlxColor = 0xFF800080

@:value(0xFF0000FF)staticinlineread onlyBLUE:FlxColor = 0xFF0000FF

@:value(0xFF8B4513)staticinlineread onlyBROWN:FlxColor = 0xFF8B4513

@:value(0xFFFFC0CB)staticinlineread onlyPINK:FlxColor = 0xFFFFC0CB

@:value(0xFFFF00FF)staticinlineread onlyMAGENTA:FlxColor = 0xFFFF00FF

@:value(0xFF00FFFF)staticinlineread onlyCYAN:FlxColor = 0xFF00FFFF

@:value(FlxMacroUtil.buildMap("flixel.util.FlxColor"))staticread onlycolorLookup:Map<String, Int> = FlxMacroUtil.buildMap("flixel.util.FlxColor")

A Map<String, Int> whose values are the static colors of FlxColor. You can add more colors for FlxColor.fromString(String) if you need.

@:implstaticred:Int

@:implstaticblue:Int

@:implstaticgreen:Int

@:implstaticalpha:Int

@:implstaticredFloat:Float

@:implstaticblueFloat:Float

@:implstaticgreenFloat:Float

@:implstaticalphaFloat:Float

@:implstaticcyan:Float

@:implstaticmagenta:Float

@:implstaticyellow:Float

@:implstaticblack:Float

@:implstatichue:Float

The hue of the color in degrees (from 0 to 359)

@:implstaticsaturation:Float

The saturation of the color (from 0 to 1)

@:implstaticbrightness:Float

The brightness (aka value) of the color (from 0 to 1)

@:implstaticlightness:Float

The lightness of the color (from 0 to 1)

Static methods

@:op(A - B)staticinlinesubtract(lhs:FlxColor, rhs:FlxColor):FlxColor

Subtract the RGB channels of one FlxColor from another

@:op(A + B)staticinlineadd(lhs:FlxColor, rhs:FlxColor):FlxColor

Add the RGB channels of two FlxColors

@:op(A * B)staticinlinemultiply(lhs:FlxColor, rhs:FlxColor):FlxColor

Multiply the RGB channels of two FlxColors

staticgradient(Color1:FlxColor, Color2:FlxColor, Steps:Int, ?Ease:Float‑>Float):Array<FlxColor>

Create a gradient from one color to another

Parameters:

Color1

The color to shift from

Color2

The color to shift to

Steps

How many colors the gradient should have

Ease

An optional easing function, such as those provided in FlxEase

Returns:

An array of colors of length Steps, shifting from Color1 to Color2

@:value({ Factor : 0.5 })staticinlineinterpolate(Color1:FlxColor, Color2:FlxColor, Factor:Float = 0.5):FlxColor

Get an interpolated color based on two different colors.

Parameters:

Color1

The first color

Color2

The second color

Factor

Value from 0 to 1 representing how much to shift Color1 toward Color2

Returns:

The interpolated color

@:value({ Alpha : 255 })staticgetHSBColorWheel(Alpha:Int = 255):Array<FlxColor>

Get HSB color wheel values in an array which will be 360 elements in size

Parameters:

Alpha

Alpha value for each color of the color wheel, between 0 (transparent) and 255 (opaque)

Returns:

HSB color wheel as Array of FlxColors

staticfromString(str:String):Null<FlxColor>

Parses a String and returns a FlxColor or null if the String couldn't be parsed.

Examples (input -> output in hex):

  • 0x00FF00 -> 0xFF00FF00
  • 0xAA4578C2 -> 0xAA4578C2
  • #0000FF -> 0xFF0000FF
  • #3F000011 -> 0x3F000011
  • GRAY -> 0xFF808080
  • blue -> 0xFF0000FF

Parameters:

str

The string to be parsed

Returns:

A FlxColor or null if the String couldn't be parsed

@:value({ Alpha : 1 })staticinlinefromHSL(Hue:Float, Saturation:Float, Lightness:Float, Alpha:Float = 1):FlxColor

Generate a color from HSL components.

Parameters:

Hue

A number between 0 and 360, indicating position on a color strip or wheel.

Saturation

A number between 0 and 1, indicating how colorful or gray the color should be. 0 is gray, 1 is vibrant.

Lightness

A number between 0 and 1, indicating the lightness of the color

Alpha

How opaque the color should be, either between 0 and 1 or 0 and 255.

Returns:

The color as a FlxColor

@:value({ Alpha : 1 })staticfromHSB(Hue:Float, Saturation:Float, Brightness:Float, Alpha:Float = 1):FlxColor

Generate a color from HSB (aka HSV) components.

Parameters:

Hue

A number between 0 and 360, indicating position on a color strip or wheel.

Saturation

A number between 0 and 1, indicating how colorful or gray the color should be. 0 is gray, 1 is vibrant.

Brightness

(aka Value) A number between 0 and 1, indicating how bright the color should be. 0 is black, 1 is full bright.

Alpha

How opaque the color should be, either between 0 and 1 or 0 and 255.

Returns:

The color as a FlxColor

@:value({ Alpha : 1 })staticinlinefromCMYK(Cyan:Float, Magenta:Float, Yellow:Float, Black:Float, Alpha:Float = 1):FlxColor

Generate a color from CMYK values (0 to 1)

Parameters:

Cyan

The cyan value of the color from 0 to 1

Magenta

The magenta value of the color from 0 to 1

Yellow

The yellow value of the color from 0 to 1

Black

The black value of the color from 0 to 1

Alpha

How opaque the color should be, from 0 to 1

Returns:

The color as a FlxColor

@:value({ Alpha : 1 })staticinlinefromRGBFloat(Red:Float, Green:Float, Blue:Float, Alpha:Float = 1):FlxColor

Generate a color from float RGB values (0 to 1)

Parameters:

Red

The red value of the color from 0 to 1

Green

The green value of the color from 0 to 1

Blue

The green value of the color from 0 to 1

Alpha

How opaque the color should be, from 0 to 1

Returns:

The color as a FlxColor

@:value({ Alpha : 255 })staticinlinefromRGB(Red:Int, Green:Int, Blue:Int, Alpha:Int = 255):FlxColor

Generate a color from integer RGB values (0 to 255)

Parameters:

Red

The red value of the color from 0 to 255

Green

The green value of the color from 0 to 255

Blue

The green value of the color from 0 to 255

Alpha

How opaque the color should be, from 0 to 255

Returns:

The color as a FlxColor

staticinlinefromInt(Value:Int):FlxColor

Create a color from the least significant four bytes of an Int

Parameters:

Value

And Int with bytes in the format 0xAARRGGBB

Returns:

The color as a FlxColor

staticinlinefromInt(Value:Int):FlxColor

Create a color from the least significant four bytes of an Int

Parameters:

Value

And Int with bytes in the format 0xAARRGGBB

Returns:

The color as a FlxColor

@:value({ Alpha : 255 })staticinlinefromRGB(Red:Int, Green:Int, Blue:Int, Alpha:Int = 255):FlxColor

Generate a color from integer RGB values (0 to 255)

Parameters:

Red

The red value of the color from 0 to 255

Green

The green value of the color from 0 to 255

Blue

The green value of the color from 0 to 255

Alpha

How opaque the color should be, from 0 to 255

Returns:

The color as a FlxColor

@:value({ Alpha : 1 })staticinlinefromRGBFloat(Red:Float, Green:Float, Blue:Float, Alpha:Float = 1):FlxColor

Generate a color from float RGB values (0 to 1)

Parameters:

Red

The red value of the color from 0 to 1

Green

The green value of the color from 0 to 1

Blue

The green value of the color from 0 to 1

Alpha

How opaque the color should be, from 0 to 1

Returns:

The color as a FlxColor

@:value({ Alpha : 1 })staticinlinefromCMYK(Cyan:Float, Magenta:Float, Yellow:Float, Black:Float, Alpha:Float = 1):FlxColor

Generate a color from CMYK values (0 to 1)

Parameters:

Cyan

The cyan value of the color from 0 to 1

Magenta

The magenta value of the color from 0 to 1

Yellow

The yellow value of the color from 0 to 1

Black

The black value of the color from 0 to 1

Alpha

How opaque the color should be, from 0 to 1

Returns:

The color as a FlxColor

@:value({ Alpha : 1 })staticfromHSB(Hue:Float, Saturation:Float, Brightness:Float, Alpha:Float = 1):FlxColor

Generate a color from HSB (aka HSV) components.

Parameters:

Hue

A number between 0 and 360, indicating position on a color strip or wheel.

Saturation

A number between 0 and 1, indicating how colorful or gray the color should be. 0 is gray, 1 is vibrant.

Brightness

(aka Value) A number between 0 and 1, indicating how bright the color should be. 0 is black, 1 is full bright.

Alpha

How opaque the color should be, either between 0 and 1 or 0 and 255.

Returns:

The color as a FlxColor

@:value({ Alpha : 1 })staticinlinefromHSL(Hue:Float, Saturation:Float, Lightness:Float, Alpha:Float = 1):FlxColor

Generate a color from HSL components.

Parameters:

Hue

A number between 0 and 360, indicating position on a color strip or wheel.

Saturation

A number between 0 and 1, indicating how colorful or gray the color should be. 0 is gray, 1 is vibrant.

Lightness

A number between 0 and 1, indicating the lightness of the color

Alpha

How opaque the color should be, either between 0 and 1 or 0 and 255.

Returns:

The color as a FlxColor

staticfromString(str:String):Null<FlxColor>

Parses a String and returns a FlxColor or null if the String couldn't be parsed.

Examples (input -> output in hex):

  • 0x00FF00 -> 0xFF00FF00
  • 0xAA4578C2 -> 0xAA4578C2
  • #0000FF -> 0xFF0000FF
  • #3F000011 -> 0x3F000011
  • GRAY -> 0xFF808080
  • blue -> 0xFF0000FF

Parameters:

str

The string to be parsed

Returns:

A FlxColor or null if the String couldn't be parsed

@:value({ Alpha : 255 })staticgetHSBColorWheel(Alpha:Int = 255):Array<FlxColor>

Get HSB color wheel values in an array which will be 360 elements in size

Parameters:

Alpha

Alpha value for each color of the color wheel, between 0 (transparent) and 255 (opaque)

Returns:

HSB color wheel as Array of FlxColors

@:value({ Factor : 0.5 })staticinlineinterpolate(Color1:FlxColor, Color2:FlxColor, Factor:Float = 0.5):FlxColor

Get an interpolated color based on two different colors.

Parameters:

Color1

The first color

Color2

The second color

Factor

Value from 0 to 1 representing how much to shift Color1 toward Color2

Returns:

The interpolated color

staticgradient(Color1:FlxColor, Color2:FlxColor, Steps:Int, ?Ease:Float‑>Float):Array<FlxColor>

Create a gradient from one color to another

Parameters:

Color1

The color to shift from

Color2

The color to shift to

Steps

How many colors the gradient should have

Ease

An optional easing function, such as those provided in FlxEase

Returns:

An array of colors of length Steps, shifting from Color1 to Color2

@:op(A * B)staticinlinemultiply(lhs:FlxColor, rhs:FlxColor):FlxColor

Multiply the RGB channels of two FlxColors

@:op(A + B)staticinlineadd(lhs:FlxColor, rhs:FlxColor):FlxColor

Add the RGB channels of two FlxColors

@:op(A - B)staticinlinesubtract(lhs:FlxColor, rhs:FlxColor):FlxColor

Subtract the RGB channels of one FlxColor from another

@:implstaticinlinegetComplementHarmony():FlxColor

Returns a Complementary Color Harmony of this color. A complementary hue is one directly opposite the color given on the color wheel

Returns:

The complimentary color

@:value({ Threshold : 30 })@:implstaticinlinegetAnalogousHarmony(Threshold:Int = 30):Harmony

Returns an Analogous Color Harmony for the given color. An Analogous harmony are hues adjacent to each other on the color wheel

Parameters:

Threshold

Control how adjacent the colors will be (default +- 30 degrees)

Returns:

Object containing 3 properties: original (the original color), warmer (the warmer analogous color) and colder (the colder analogous color)

@:value({ Threshold : 30 })@:implstaticinlinegetSplitComplementHarmony(Threshold:Int = 30):Harmony

Returns an Split Complement Color Harmony for this color. A Split Complement harmony are the two hues on either side of the color's Complement

Parameters:

Threshold

Control how adjacent the colors will be to the Complement (default +- 30 degrees)

Returns:

Object containing 3 properties: original (the original color), warmer (the warmer analogous color) and colder (the colder analogous color)

@:implstaticinlinegetTriadicHarmony():TriadicHarmony

Returns a Triadic Color Harmony for this color. A Triadic harmony are 3 hues equidistant from each other on the color wheel.

Returns:

Object containing 3 properties: color1 (the original color), color2 and color3 (the equidistant colors)

@:implstaticinlineto24Bit():FlxColor

Return a 24 bit version of this color (i.e. without an alpha value)

Returns:

A 24 bit version of this color

@:value({ Prefix : true, Alpha : true })@:implstaticinlinetoHexString(Alpha:Bool = true, Prefix:Bool = true):String

Return a String representation of the color in the format

Parameters:

Alpha

Whether to include the alpha value in the hes string

Prefix

Whether to include "0x" prefix at start of string

Returns:

A string of length 10 in the format 0xAARRGGBB

@:implstaticinlinetoWebString():String

Return a String representation of the color in the format #RRGGBB

Returns:

A string of length 7 in the format #RRGGBB

@:implstaticgetColorInfo():String

Get a string of color information about this color

Returns:

A string containing information about this color

@:value({ Factor : 0.2 })@:implstaticgetDarkened(Factor:Float = 0.2):FlxColor

Get a darkened version of this color

Parameters:

Factor

Value from 0 to 1 of how much to progress toward black.

Returns:

A darkened version of this color

@:value({ Factor : 0.2 })@:implstaticinlinegetLightened(Factor:Float = 0.2):FlxColor

Get a lightened version of this color

Parameters:

Factor

Value from 0 to 1 of how much to progress toward white.

Returns:

A lightened version of this color

@:implstaticinlinegetInverted():FlxColor

Get the inversion of this color

Returns:

The inversion of this color

@:value({ Alpha : 255 })@:implstaticinlinesetRGB(Red:Int, Green:Int, Blue:Int, Alpha:Int = 255):FlxColor

Set RGB values as integers (0 to 255)

Parameters:

Red

The red value of the color from 0 to 255

Green

The green value of the color from 0 to 255

Blue

The green value of the color from 0 to 255

Alpha

How opaque the color should be, from 0 to 255

Returns:

This color

@:value({ Alpha : 1 })@:implstaticinlinesetRGBFloat(Red:Float, Green:Float, Blue:Float, Alpha:Float = 1):FlxColor

Set RGB values as floats (0 to 1)

Parameters:

Red

The red value of the color from 0 to 1

Green

The green value of the color from 0 to 1

Blue

The green value of the color from 0 to 1

Alpha

How opaque the color should be, from 0 to 1

Returns:

This color

@:value({ Alpha : 1 })@:implstaticinlinesetCMYK(Cyan:Float, Magenta:Float, Yellow:Float, Black:Float, Alpha:Float = 1):FlxColor

Set CMYK values as floats (0 to 1)

Parameters:

Cyan

The cyan value of the color from 0 to 1

Magenta

The magenta value of the color from 0 to 1

Yellow

The yellow value of the color from 0 to 1

Black

The black value of the color from 0 to 1

Alpha

How opaque the color should be, from 0 to 1

Returns:

This color

@:implstaticinlinesetHSB(Hue:Float, Saturation:Float, Brightness:Float, Alpha:Float):FlxColor

Set HSB (aka HSV) components

Parameters:

Hue

A number between 0 and 360, indicating position on a color strip or wheel.

Saturation

A number between 0 and 1, indicating how colorful or gray the color should be. 0 is gray, 1 is vibrant.

Brightness

(aka Value) A number between 0 and 1, indicating how bright the color should be. 0 is black, 1 is full bright.

Alpha

How opaque the color should be, either between 0 and 1 or 0 and 255.

Returns:

This color

@:implstaticinlinesetHSL(Hue:Float, Saturation:Float, Lightness:Float, Alpha:Float):FlxColor

Set HSL components.

Parameters:

Hue

A number between 0 and 360, indicating position on a color strip or wheel.

Saturation

A number between 0 and 1, indicating how colorful or gray the color should be. 0 is gray, 1 is vibrant.

Lightness

A number between 0 and 1, indicating the lightness of the color

Alpha

How opaque the color should be, either between 0 and 1 or 0 and 255

Returns:

This color

@:value({ Value : 0 })@:implstaticnew(Value:Int = 0)