RGBfromHSV example for Delphi
//Takes an HSV, displays the HSV components, and displays the RGB components
Procedure HSVtoRGB(nH: Smallint; nS: Smallint; nV: Smallint);
var
cr: OLE_COLOR;
red: Byte;
green: Byte;
blue: Byte;
RasterProc: LEADRasterProcess;
begin
RasterProc:= CreateComObject (CLASS_LEADRasterProcess) as LEADRasterProcess;
cr:= RasterProc.RGBfromHSV (nH, nS, nV);
red:= GetRValue(cr);
green:=GetGValue(cr);
blue:= GetBValue(cr);
ShowMessage ('HSV (' + IntToStr(nH) + ',' + IntToStr(nS) + ',' + IntToStr(nV) + ') is RGB(' + IntToStr(red) + ',' + IntToStr(green) + ',' + IntToStr(blue) + ')');
end;