SDL_Color(3)
β¨ SDL_Color(3) β¨
okay bestie, welcome to the SDL API Reference π this is a page from the SDL manual, and it's literally about colors, so you KNOW we're gonna have fun with it π
π NAME π
SDL_Color β a format independent color description π
no cap, that's the whole vibe.
π§ STRUCTURE DEFINITION π§
here's the shape of it, character for character, don't @ me:
typedef struct{
Uint8 r;
Uint8 g;
Uint8 b;
Uint8 unused;
} SDL_Color;
look at her. four little Uint8s. iconic. π
πΈ STRUCTURE DATA πΈ
rβ red intensity π₯gβ green intensity πbβ blue intensity πunusedβ unused π yeah she's just... there. chilling. not doing anything. main character energy without a storyline.
π¦ DESCRIPTION π¦
okay so the way that SDL_Color works is that it describes a color in a format independent way. like, it's not tied to any one pixel format, she's flexible, she contains multitudes π
and if you wanna turn an SDL_Color into an actual pixel value for a certain pixel format? you use SDL_MapRGB. that's the move. that's the conversion. slay. β¨
π« SEE ALSO π«
SDL_PixelFormatSDL_SetColorsSDL_Palette
kisses, bestie, go forth and color stuff π«ΆπΈ this was SDL, dated Tue 11 Sep 2001, 23:01 β yeah she's vintage, she's a classic, and she still ate π
π
π¦ where this page comes from
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 Β· LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms