in the example below i can't understand how the variable 'color' can apparently store the indivdual RGB values, in the header file it describes this function as
Maps an RGB triple to an opaque pixel value for a given pixel format
could anybody please enlighten me on this?


and the Uint32, is that some kind of SDL variable type or just an alternative way of writing unsigned 32bit integer? i mean would simply 'int color' have worked here too?

Code:
SDL_Rect rect;
    
Uint32 color;

    color = SDL_MapRGB (screen->format, 50, 50, 50);

    SDL_FillRect (screen, NULL, color);