Graphic Delphi

// Tolga Çakıroğlu - ( For User 2003-2004 )
Function Karart( renk: tcolor; miktar: byte ): tcolor;
var
R ,
G ,
B : Integer;
begin
R:= GetRValue( Renk ); Dec(R, miktar);
G:= GetGValue( Renk ); Dec(G, miktar);
B:= GetBValue( Renk ); Dec(B, miktar);
if R<0 then R:= 0;
if G<0 then G:= 0;
if B<0 then B:= 0;
Result:= R + (G shl 8) + (B shl 16);
end;