RGBfromHSV example for C++Builder
//Takes an HSV, displays the HSV components, and displays the RGB components
void TForm1::HSVtoRGB( short nH, short nS, short nV)
{
TColorRef cr;
int nRed, nGreen, nBlue;
cr= LEADImage1->RGBfromHSV((short)nH, (short)nS, (short)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) + ")");
}