Construct a color from red, green, blue, and alpha channels.
Color
RGBA colors.
Channels are 8-bit sRGB values. Alpha is 0 for transparent and 255 for
fully opaque. A color is a plain value: build one, keep it in the model, and
hand it to any drawing call.
The named constants cover the common cases, from_hex_rgb reads the form a
designer hands over, and with_alpha makes any of them translucent.
accent = Color.from_hex_rgb(0x2f80ed)
glow = Color.with_alpha(accent, 100)
These types live in the companion roc-ray-types package and are re-exported
here, so a value passes between the two spellings freely and a library can
depend on the package without depending on this platform.
Construct an opaque color from red, green, and blue channels.
with_alpha : Rgba, U8 -> Rgba
Return a copy with a new alpha channel.
from_hex_rgb : U32 -> Rgba
Decode 0xRRGGBB into an opaque color.
from_hex_rgba : U32 -> Rgba
Decode 0xRRGGBBAA into a color.
transparent : Rgba
Fully transparent black.
black : Rgba
Black.
blue : Rgba
Raylib's standard blue.
dark_gray : Rgba
Raylib's standard dark gray.
gray : Rgba
Raylib's standard gray.
green : Rgba
Raylib's standard green.
light_gray : Rgba
Raylib's standard light gray.
orange : Rgba
Raylib's standard orange.
pink : Rgba
Raylib's standard pink.
purple : Rgba
Raylib's standard purple.
ray_white : Rgba
Raylib's warm off-white background color.
red : Rgba
Raylib's standard red.
white : Rgba
White.
yellow : Rgba
Raylib's standard yellow.
Rgba : Rgba
An 8-bit sRGB color with alpha. Color.Rgba on the platform is this same
type, re-exported.