raylib/color
color
(color [r : int g : int b : int a : int] :)
construct a Color from RGBA components (0-255 each).
| r | red channel (0-255) | |
| g | green channel (0-255) | |
| b | blue channel (0-255) | |
| a | alpha channel (0-255) |
Opaque :int handle to a heap-allocated Raylib Color struct.
(color 255 128 0 255) ; => orange
Since: P3
red
(red :)
Raylib RED color constant (230, 41, 55, 255).
Since: P3
green
(green :)
Raylib GREEN color constant (0, 228, 48, 255).
Since: P3
blue
(blue :)
Raylib BLUE color constant (0, 121, 241, 255).
Since: P3
white
(white :)
Raylib WHITE color constant (255, 255, 255, 255).
Since: P3
black
(black :)
Raylib BLACK color constant (0, 0, 0, 255).
Since: P3
gray
(gray :)
Raylib GRAY color constant (130, 130, 130, 255).
Since: P3
yellow
(yellow :)
Raylib YELLOW color constant (253, 249, 0, 255).
Since: P3
orange
(orange :)
Raylib ORANGE color constant (255, 161, 0, 255).
Since: P3
purple
(purple :)
Raylib PURPLE color constant (200, 122, 255, 255).
Since: P3
pink
(pink :)
Raylib PINK color constant (255, 109, 194, 255).
Since: P3
skyblue
(skyblue :)
Raylib SKYBLUE color constant (102, 191, 255, 255).
Since: P3
raywhite
(raywhite :)
Raylib RAYWHITE color constant (245, 245, 245, 255).
Since: P3
fade
(fade [col : int alpha : float] :)
return a copy of a color with its alpha multiplied by the given factor.
| col | Color handle to fade | |
| alpha | opacity factor in [0.0, 1.0] |
A new heap-allocated Color handle with adjusted alpha.
(fade (red) 0.5) ; => semi-transparent red
Since: P3
color-lerp
(color-lerp [c1 : int c2 : int t : float] :)
linearly interpolate between two colors.
| c1 | start Color handle | |
| c2 | end Color handle | |
| t | interpolation 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