###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) # SDL_PixelFormat Details about the format of a pixel. ## Header File Defined in [](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_pixels.h) ## Syntax ```c typedef struct SDL_PixelFormat { SDL_PixelFormatEnum format; SDL_Palette *palette; Uint8 bits_per_pixel; Uint8 bytes_per_pixel; Uint8 padding[2]; Uint32 Rmask; Uint32 Gmask; Uint32 Bmask; Uint32 Amask; Uint8 Rloss; Uint8 Gloss; Uint8 Bloss; Uint8 Aloss; Uint8 Rshift; Uint8 Gshift; Uint8 Bshift; Uint8 Ashift; int refcount; struct SDL_PixelFormat *next; } SDL_PixelFormat; ``` ## Remarks Generally this is used with [SDL_Surface](SDL_Surface), and covers many possible configurations, including paletted data and various bit patterns. ## Version This struct is available since SDL 3.0.0. ---- [CategoryAPI](CategoryAPI), [CategoryAPIStruct](CategoryAPIStruct)