ChangeRGBColor
function ChangeRGBColor(color:TRGBTriple;R,G,B:integer):TRGBTriple; begin if B+Color.rgbtBlue >255 then Color.rgbtBlue :=255 else if B+Color.rgbtBlue <0 then Color.rgbtBlue :=0 else inc(Color.rgbtBlue,B) ; if G+Color.rgbtGreen >255 then Color.rgbtGreen :=255 else if G+Color.rgbtGreen <0 then Color.rgbtGreen :=0 else inc(Color.rgbtGreen,G) ; if R+Color.rgbtRed >255 then Color.rgbtRed :=255 else if R+Color.rgbtRed <0 then Color.rgbtRed :=0 else inc(Color.rgbtRed,R) ; Result:=Color; end;