Color

constructor(r: ERROR CLASS: Symbol not found for UByte, g: ERROR CLASS: Symbol not found for UByte, b: ERROR CLASS: Symbol not found for UByte, a: ERROR CLASS: Symbol not found for UByte = 255.toUByte())


constructor(raw: ERROR CLASS: Symbol not found for raylib.internal.Color)

Creates a Color instance from a raw raylib Color structure.

Parameters

raw

The raw raylib Color structure.


constructor(raw: ERROR CLASS: Symbol not found for CValue<ERROR CLASS: Symbol not found for raylib.internal.Color>)

Creates a Color instance from a raw raylib Color CValue.

Parameters

raw

The raw raylib Color CValue.


constructor(r: Int, g: Int, b: Int, a: Int = 255)

Creates a Color instance from integer values for red, green, blue, and alpha components.

Parameters

r

The red component (0-255).

g

The green component (0-255).

b

The blue component (0-255).

a

The alpha component (0-255).


constructor(argb: Int)

Creates a Color instance from a single integer representing an ARGB color.

Parameters

argb

The ARGB color as an integer.


constructor(argb: Long)

Creates a Color instance from a single long integer representing an ARGB color.

Parameters

argb

The RGBA color as a long integer.


constructor(hex: String)

Creates a Color instance from a hexadecimal color string. The string should be in the format "#RRGGBB" or "#RRGGBBAA". The hashtag is required.

Parameters

hex

The hexadecimal color string.


constructor(hue: Float, saturation: Float, value: Float)

Creates a Color instance from HSV (Hue, Saturation, Value) components.

Parameters

hue

The hue component (0-360).

saturation

The saturation component (0-1).

value

The value component (0-1).


constructor(r: Float, g: Float, b: Float, a: Float = 1.0f)

Creates a Color instance from float values for red, green, blue, and alpha components. Each component should be in the range 0.0 to 1.0.

Parameters

r

The red component (0.0-1.0).

g

The green component (0.0-1.0).

b

The blue component (0.0-1.0).

a

The alpha component (0.0-1.0).


constructor(r: Double, g: Double, b: Double, a: Double = 1.0)

Creates a Color instance from double values for red, green, blue, and alpha components. Each component should be in the range 0.0 to 1.0.

Parameters

r

The red component (0.0-1.0).

g

The green component (0.0-1.0).

b

The blue component (0.0-1.0).

a

The alpha component (0.0-1.0).