RGBfromHSV example for Delphi
//Takes an HSV, displays the HSV components, and displays the RGB components
Procedure TForm1.HSVtoRGB( nH: Integer; nS: Integer; nV: Integer);
var
cr: TColorRef ;
nRed, nGreen, nBlue: Integer;
begin
cr:= LEADImage1.RGBfromHSV(nH, nS, nV);
nRed:= GetRValue(cr);
nGreen:= GetGValue(cr);
nBlue:= GetBValue(cr);
ShowMessage ( 'HSV('+IntToStr(nH)+ ', '+
IntToStr(nS)+ ', '+
IntToStr (nV) + ' )' +
' is RGB(' + IntToStr (nRed) + ', '+
IntToStr (nGreen) + ', '+
IntToStr (nBlue) + ')');
end;