05-05-2013, 11:31 AM
حل سريع اخر...
كود :
type
TCoulor = record
case Integer of
0:(color: Dword);
1:(r,g,b,nop: byte);
end;
Var Coulor : TCoulor;
function MakeRGB(r, g, b: Byte): COLORREF;
begin
Coulor.r:=r;
Coulor.g:=g;
Coulor.b:=b;
result:=Coulor.color;
end;
function GetBValueX(RGB:Cardinal):Byte;
begin
result:=Coulor.b;
end;
function GetGValueX(RGB:Cardinal):Byte;
begin
result:=Coulor.g;
end;
function GetRValueX(RGB:Cardinal):Byte;
begin
result:=Coulor.r;
end;
