No matching definitions.

raylib/color

src/raylib/color.tur
defn

color

(color [r : int g : int b : int a : int] :)

construct a Color from RGBA components (0-255 each).

rred channel (0-255)
ggreen channel (0-255)
bblue channel (0-255)
aalpha channel (0-255)

Opaque :int handle to a heap-allocated Raylib Color struct.

(color 255 128 0 255)  ; => orange

Since: P3

defn

red

(red :)

Raylib RED color constant (230, 41, 55, 255).

Since: P3

defn

green

(green :)

Raylib GREEN color constant (0, 228, 48, 255).

Since: P3

defn

blue

(blue :)

Raylib BLUE color constant (0, 121, 241, 255).

Since: P3

defn

white

(white :)

Raylib WHITE color constant (255, 255, 255, 255).

Since: P3

defn

black

(black :)

Raylib BLACK color constant (0, 0, 0, 255).

Since: P3

defn

gray

(gray :)

Raylib GRAY color constant (130, 130, 130, 255).

Since: P3

defn

yellow

(yellow :)

Raylib YELLOW color constant (253, 249, 0, 255).

Since: P3

defn

orange

(orange :)

Raylib ORANGE color constant (255, 161, 0, 255).

Since: P3

defn

purple

(purple :)

Raylib PURPLE color constant (200, 122, 255, 255).

Since: P3

defn

pink

(pink :)

Raylib PINK color constant (255, 109, 194, 255).

Since: P3

defn

skyblue

(skyblue :)

Raylib SKYBLUE color constant (102, 191, 255, 255).

Since: P3

defn

raywhite

(raywhite :)

Raylib RAYWHITE color constant (245, 245, 245, 255).

Since: P3

defn

fade

(fade [col : int alpha : float] :)

return a copy of a color with its alpha multiplied by the given factor.

colColor handle to fade
alphaopacity factor in [0.0, 1.0]

A new heap-allocated Color handle with adjusted alpha.

(fade (red) 0.5)  ; => semi-transparent red

Since: P3

defn

color-lerp

(color-lerp [c1 : int c2 : int t : float] :)

linearly interpolate between two colors.

c1start Color handle
c2end Color handle
tinterpolation factor in [0.0, 1.0]

A new heap-allocated Color handle with interpolated RGBA values.

(color-lerp (red) (blue) 0.5)  ; => purple-ish

Since: P3