Graphic Delphi

function GetSystemPaletteDepth: String;
var
DesktopDC: HDC;
BitsPerPixel: Integer;
begin
DesktopDC := GetDC(0);
BitsPerPixel := GetDeviceCaps(DesktopDC, BITSPIXEL);
case BitsPerPixel of
4 : Result := '16 Farben (4-Bit Color)';
8 : Result := '256 Farben (8-Bit Color)';
16: Result := '64k Farben (16-Bit Color)';
24: Result := '16M Farben (24-Bit Color)';
32: Result := 'True Color (32-Bit Color)';
end;
ReleaseDC(0, DesktopDC);
end;