Graphic Delphi

function tform1.negatifrenk(renk:Tcolor):Tcolor;
var r,g,b:Byte;
begin
R:=255-GetRValue(renk);
G:=255-GetgValue(renk);
b:=255-GetbValue(renk);
result:=rgb(R,G,b);
end;