Decomposing r g b a values in sdl_mapRGBA (delphi)

First, escuse me for my english :confused:
How i can find the r g b a values when i build a color like this:

// sdl_video… and SDL_SetAlpha already initialised
SrcColor : cardinal;

SrcColor:= SDL_MapRGBA(gL2KMAINScreen.screen.format, 255, 150, 0, 200);

I try:
alpha := (SrcColor and $000000ff);
But it don’t work! :confused: (bis)
Someone can help me?
thks.

z.samir wrote:

First, escuse me for my english :confused:
How i can find the r g b a values when i build a color like this:

// sdl_video… and SDL_SetAlpha already initialised
SrcColor : cardinal;

SrcColor:= SDL_MapRGBA(gL2KMAINScreen.screen.format, 255, 150, 0, 200);

I try:
alpha := (SrcColor and $000000ff);
But it don’t work! :confused: (bis)

No, it won’t work.

Try to use SDL_GetRGBA.

Stephane