30-04-2013, 12:45 PM
إقتباس :حل سليم و صحيح لكنك خالفت الشرط الأول !!!لم انتبه للشرط الاول بسبب السرعة...هذا حل أخر بوقت اقل من السابق!
كود :
function MakeRGB(r, g, b: Byte): COLORREF;
begin
result:=b*$10000+g*$100+r;
end;
function GetBValueX(RGB:Cardinal):Byte;
begin
result:= RGB div $10000;
end;
function GetGValueX(RGB:Cardinal):Byte;
begin
result:= RGB div $100;
end;
function GetRValueX(RGB:Cardinal):Byte;
begin
result:= RGB div 1;
end;
