Skip to main content

Color

Complete API reference for Color, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Vector

Component: no


public class Color

Constructors

SignatureDescription
Color(ColorINT)Executes Color and returns after the underlying engine call finishes.
Color()Executes Color and returns after the underlying engine call finishes.
Color(int, int, int)Creates a new instance of Color.
Color(float, float, float)Creates a new instance of Color.
Color(int, int, int, int)Creates a new instance of Color.
Color(float, float, float, float)Creates a new instance of Color.
Color(String)Creates a new instance of Color.

Attributes

NameTypeDescription
instanceColorINTRepresents the instance value stored on this instance. Read or assign to update the property.

Methods

SignatureReturnsDescription
set(Color)voidSets the Color of this instance to the specified Color.
getInt()intReturns the int value of the Color.
setInt(int)voidSets the Color to the Color of the specified int value.
fromHexString(String)voidSets the Color to the Color of the specified hex code.
fromHex(String)voidSets the Color to the Color of the specified hex code.
getHexString()StringReturns the hexadecimal code of the Color.
toHex()StringReturns the hexadecimal code of the Color.
getIntAlpha()intReturns the int value of the opacity (alpha channel) of the Color (0-255).
setIntAlpha(int)voidSets the int value of the opacity (alpha channel) of the Color (0-255).
getIntRed()intReturns the int value of the red channel of the color (0-255).
setIntRed(int)voidSets the int value of the red channel of the color (0-255).
getIntGreen()intReturns the int value of the green channel of the color (0-255).
setIntGreen(int)voidSets the int value of the green channel of the color (0-255).
getIntBlue()intReturns the int value of the blue channel of the color (0-255).
setIntBlue(int)voidSets the int value of the blue channel of the color (0-255).
setInts(int, int, int, int)voidSets the int values of the ARGB channels (alpha, red, green, and blue) to the specified values, respectively.
setInts(int, int, int)voidSets the int values of the RGB channels (red, green, and blue) to the specified values, respectively.
getFloatAlpha()floatReturns the float value of the opacity (alpha channel) of the Color (0.0f - 1.0f).
setFloatAlpha(float)voidSets the float value of the opacity (alpha channel) of the Color (0.0f - 1.0f).
getFloatRed()floatReturns the float value of the red channel of the color (0.0f - 1.0f).
setFloatRed(float)voidSets the float value of the red channel of the color (0.0f - 1.0f).
getFloatGreen()floatReturns the float value of the green channel of the color (0.0f - 1.0f).
setFloatGreen(float)voidSets the float value of the green channel of the color (0.0f - 1.0f).
getFloatBlue()floatReturns the float value of the blue channel of the color (0.0f - 1.0f).
setFloatBlue(float)voidSets the float value of the blue channel of the color (0.0f - 1.0f).
setFloats(float, float, float, float)voidSets the float values of the ARGB channels (alpha, red, green, and blue) to the specified values, respectively.
setFloats(float, float, float)voidSets the float values of the RGB channels (red, green, and blue) to the specified values, respectively.
sum(Color)ColorAdds the current Color to the specified Color and returns a new Color.
sum(Vector3)ColorAdds the current Color to the specified Vector3 and returns a new Color.
sum(Vector2)ColorAdds the current Color to the specified Vector2 and returns a new Color.
sub(Color)ColorSubtracts the specified Color from the current Color and returns a new Color.
sub(Vector3)ColorSubtracts the specified Vector3 from the current Color and returns a new Color.
sub(Vector2)ColorSubtracts the specified Vector2 from the current Color and returns a new Color.
mul(Color)ColorMultiplies the current Color by the specified Color and returns a new Color.
mul(Vector3)ColorMultiplies the current Color by the specified Vector3 and returns a new Color.
mul(Vector2)ColorMultiplies the current Color by the specified Vector2 and returns a new Color.
div(Color)ColorDivides the current Color by the specified Color and returns a new Color.
div(Vector3)ColorDivides the current Color by the specified Vector3 and returns a new Color.
div(Vector2)ColorDivides the current Color by the specified Vector2 and returns a new Color.
sumLocal(Color)voidAdds the current Color to the specified Color and modifies the current Color.
sumLocal(Vector3)voidAdds the current Color to the specified Vector3 and modifies the current Color.
sumLocal(Vector2)voidAdds the current Color to the specified Vector2 and modifies the current Color.
subLocal(Color)voidSubtracts the specified Color from the current Color and modifies the current Color.
subLocal(Vector3)voidSubtracts the specified Vector3 from the current Color and modifies the current Color.
subLocal(Vector2)voidSubtracts the specified Vector2 from the current Color and modifies the current Color.
mulLocal(Color)voidMultiplies the current Color by the specified Color and modifies the current Color.
mulLocal(Vector3)voidMultiplies the current Color by the specified Vector3 and modifies the current Color.
mulLocal(Vector2)voidMultiplies the current Color by the specified Vector2 and modifies the current Color.
divLocal(Color)voidDivides the current Color by the specified Color and modifies the current Color.
divLocal(Vector3)voidDivides the current Color by the specified Vector3 and modifies the current Color.
divLocal(Vector2)voidDivides the current Color by the specified Vector2 and modifies the current Color.
lerp(Color, float)voidInterpolates/smoothes between the current Color and the specified Color based on the provided speed/interval and modifies the current Color.
lerp(float, float, float, float, float)voidInterpolates/smoothes between the current Color and the specified ARGB (alpha, red, green, and blue) values based on the provided speed/interval and modifies the current Color.
lerp(float, float)voidInterpolates/smoothes between the current Color and the specified value based on the provided speed/interval and modifies the current Color.
lerpOut(Color, float)ColorInterpolates/smoothes between the current Color and the specified Color based on the provided speed/interval and returns a new Color.
lerpOut(float, float, float, float, float)ColorInterpolates/smoothes between the current Color and the specified ARGB (alpha, red, green, and blue) values based on the provided speed/interval and returns a new Color.
lerpOut(float, float)ColorInterpolates/smoothes between the current Color and the specified value based on the provided speed/interval and returns a new Color.
lerpInSeconds(Color, float)voidInterpolates/smoothes between the current Color and the specified Color based on the provided speed/interval in one second and modifies the current Color.
lerpInSeconds(float, float, float, float, float)voidInterpolates/smoothes between the current Color and the specified ARGB (alpha, red, green, and blue) values based on the provided speed/interval in one second and modifies the current Color.
lerpInSeconds(float, float)voidInterpolates/smoothes between the current Color and the specified value based on the provided speed/interval in one second and modifies the current Color.
lerpOutInSeconds(Color, float)ColorInterpolates/smoothes between the current Color and the specified Color based on the provided speed/interval in one second and returns a new Color.
lerpOutInSeconds(float, float, float, float, float)ColorInterpolates/smoothes between the current Color and the specified ARGB (alpha, red, green, and blue) values based on the provided speed/interval in one second and returns a new Color.
lerpOutInSeconds(float, float)ColorInterpolates/smoothes between the current Color and the specified value based on the provided speed/interval in one second and returns a new Color.
blend(Color, float)voidBlends between the current Color and the specified Color based on the provided percentage (0-1) and modifies the current Color.
blend(float, float, float, float, float)voidBlends between the current Color and the specified ARGB (alpha, red, green, and blue) values based on the provided percentage (0-1) and modifies the current Color.
blend(float, float)voidBlends between the current Color and the specified value based on the provided percentage (0-1) and modifies the current Color.
blendOut(Color, float)ColorBlends between the current Color and the specified Color based on the provided percentage (0-1) and returns a new Color.
blendOut(float, float, float, float, float)ColorBlends between the current Color and the specified ARGB (alpha, red, green, and blue) values based on the provided percentage (0-1) and returns a new Color.
blendOut(float, float)ColorBlends between the current Color and the specified value based on the provided percentage (0-1) and returns a new Color.
toString()StringReturns a String of the int ARGB values (alpha, red, green, and blue) of the Color.
copy()ColorReturns a copy of the current Color instance.
equals(Object)booleanReturns true if the specified Color is equal to the current Color.
pointerEquals(Object)booleanReturns true if the instance of the specified Color is equal to the instance of the current Color.
notEquals(Object)booleanReturns true if the specified Color is different from the current Color.
greaterThan(Object)booleanReturns true if the current Color has greater values than the specified Color.
greaterThan(float)booleanReturns true if the current Color has greater values than the specified value.
greaterThan(int)booleanReturns true if the current Color has greater values than the specified value.
greaterThan(long)booleanReturns true if the current Color has greater values than the specified value.
greaterThan(double)booleanReturns true if the current Color has greater values than the specified value.
greaterOrEqualsThan(Object)booleanReturns true if the current Color has greater than or equal values to the specified Color.
greaterOrEqualsThan(float)booleanReturns true if the current Color has greater than or equal values to the specified value.
greaterOrEqualsThan(int)booleanReturns true if the current Color has greater than or equal values to the specified value.
greaterOrEqualsThan(long)booleanReturns true if the current Color has greater than or equal values to the specified value.
greaterOrEqualsThan(double)booleanReturns true if the current Color has greater than or equal values to the specified value.
lessThan(Object)booleanReturns true if the current Color has less values than the specified Color.
lessThan(float)booleanReturns true if the current Color has less values than the specified value.
lessThan(int)booleanReturns true if the current Color has less values than the specified value.
lessThan(long)booleanReturns true if the current Color has less values than the specified value.
lessThan(double)booleanReturns true if the current Color has less values than the specified value.
lessOrEqualsThan(Object)booleanReturns true if the current Color has less than or equal values to the specified Color.
lessOrEqualsThan(float)booleanReturns true if the current Color has less than or equal values to the specified value.
lessOrEqualsThan(int)booleanReturns true if the current Color has less than or equal values to the specified value.
lessOrEqualsThan(long)booleanReturns true if the current Color has less than or equal values to the specified value.
lessOrEqualsThan(double)booleanReturns true if the current Color has less than or equal values to the specified value.
sum(Object)TAdds 2 colors and returns a new Color.
sumEqual(Object)voidAdds 2 colors and modifies the current Color with the result.
div(Object)TDivides 2 colors and returns a new Color.
divEqual(Object)voidDivides 2 colors and modifies the current Color with the result.
mul(Object)TMultiplies 2 colors and returns a new Color.
mulEqual(Object)voidMultiplies 2 colors and modifies the current Color with the result.
sub(Object)TSubtracts 2 colors and returns a new Color.
subEqual(Object)voidSubtracts 2 colors and modifies the current Color with the result.
serializeToString()StringSerializes the color to a String in the format '[R;G;B;A]'.
deserializeLocal(String)voidDeserializes a String in the format '[R;G;B;A]' and sets the values to this color.

Static Methods

SignatureReturnsDescription
genericInterface()GenericClassInspectorEntryExecutes genericInterface and returns after the underlying engine call finishes.
inspectorController()ClassInspectorEntryExecutes inspectorController and returns after the underlying engine call finishes.
RED()ColorReturns the red Color (255, 255, 0, 0).
WHITE()ColorReturns the white Color (255, 255, 255, 255).
BLACK()ColorReturns the black Color (255, 0, 0, 0).
GREEN()ColorReturns the green Color (255, 0, 255, 0).
BLUE()ColorReturns the blue Color (255, 0, 0, 255).
YELLOW()ColorReturns the yellow Color (255, 241, 196, 15).
PINK()ColorReturns the red Color (255, 255, 0, 255).
isNull(Object)booleanReturns true if the specified Color is null.