No matching definitions.

raylib/color

src/raylib/color.tur
defn

color

(color [r :int g :int b :int a :int] :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 :int)

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

Since: P3

defn

green

(green :int)

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

Since: P3

defn

blue

(blue :int)

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

Since: P3

defn

white

(white :int)

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

Since: P3

defn

black

(black :int)

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

Since: P3

defn

gray

(gray :int)

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

Since: P3

defn

yellow

(yellow :int)

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

Since: P3

defn

orange

(orange :int)

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

Since: P3

defn

purple

(purple :int)

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

Since: P3

defn

pink

(pink :int)

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

Since: P3

defn

skyblue

(skyblue :int)

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

Since: P3

defn

raywhite

(raywhite :int)

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

Since: P3

defn

fade

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

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] :int)

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