Did you know ... Search Documentation:
Pack sdlpl -- prolog/sdl/pixels.pl
PublicShow source
 sdl_pixel_format(?Format:atom, ?Value:integer) is nondet
Enumerate the SDL pixel formats and their exact bit values. Each format is a Prolog atom linked to its SDL 32-bit pixel format value.

The user-facing format atoms are:

  • argb8888, rgba8888, bgra8888, abgr8888
  • xrgb8888, xbgr8888, rgbx8888, bgrx8888
  • argb32, rgba32, bgra32, abgr32
  • xrgb32, xbgr32, rgbx32, bgrx32
  • rgb24, bgr24
  • rgb565, bgr565

The *8888, *24 and *565 formats are platform-independent. The *32 aliases are platform-dependent: they resolve to the concrete 8888 formats according to the CPU byte order of the running platform, as shown in the values below (valid for little-endian builds). The pack ships as a unit (.pl + .so built for the same platform), so this is always consistent.

See also
- https://wiki.libsdl.org/SDL3/SDL_PixelFormat