The Color Conversion C API provides a color space dialog that can be used to initialize a conversion. To do a dialog based initialization follow the steps below:
Dim RGBData(100) As ByteDim LABData(100) As ByteDim nWidth As IntegerDim nHeight As IntegerDim nInAlign As IntegerDim nOutAlign As IntegerDim ClrHandle As Long 'color handleDim cnvParam As CONVERSION\_PARAMS
Display the color space dialog box to initialize as follows:
L_ClrDlg DLG_LAB, Form1.hWnd, ClrHandle, cnvParam
Convert from RGB to CIELab as follows:
L_ClrConvert ClrHandle, RGBData(0), LABData(0), nWidth, nHeight, nInAlign, nOutAlign
At the end, free the color conversion handle:
L_ClrFree ClrHandle