v2026.5.3
All Bundles
Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.

Color

Structure that represents a color

Operations

GetA #

Get alpha

method : public : GetA() ~ Int

Return

TypeDescription
Intalpha

GetB #

Get blue

method : public : GetB() ~ Int

Return

TypeDescription
Intblue

GetG #

Get green

method : public : GetG() ~ Int

Return

TypeDescription
Intgreen

GetR #

Get red

method : public : GetR() ~ Int

Return

TypeDescription
Intred

New # constructor

Default black color

New()

New # constructor

RGB Color with alpha set to 255

New(r:Int, g:Int, b:Int)

Parameters

NameTypeDescription
rIntred
gIntgreen
bIntblue

New # constructor

RGBA color

New(r:Int, g:Int, b:Int, a:Int)

Parameters

NameTypeDescription
rIntred
gIntgreen
bIntblue
aIntalpha

SetA #

Set alpha

method : public : SetA(a:Int) ~ Nil

Parameters

NameTypeDescription
aIntalpha

SetB #

Set blue

method : public : SetB(b:Int) ~ Nil

Parameters

NameTypeDescription
bIntblue

SetG #

Set green

method : public : SetG(g:Int) ~ Nil

Parameters

NameTypeDescription
gIntgreen

SetR #

Set red

method : public : SetR(r:Int) ~ Nil

Parameters

NameTypeDescription
rIntred

ToString #

String RGBA representation

method : public : ToString() ~ String

Return

TypeDescription
Stringstring representation