CurrenOfColorValue=(CurrentValue-MinValue)/(MaxValue-MinValue)*255*2
if CurrentOfColor>255 then
being
RedValue=255
GreenValue=CurrentOfColor-255
BlueValue=GreenValue
end
else
begin
RedValue=CurrentOfColor
GreenValue=0
BlueValue=0
end
theColorIWant=RGB(RedValue,GreenValue,BlueValue)
procedure TForm1.FormPaint(Sender: TObject);
var
i:word;
dy,y:real;
begin
dy:=clientheight/256;
y:=0;
for i:=0 to 255 do
begin
canvas.brush.color:=$000000ff+i*$10000;
canvas.fillrect(rect(0,round(y),clientwidth,round(y+dy)));
y:=y+dy;
end;
end;