Convert between LabTalk color and OC OCOLOR.LabTalk color is 1-offset for indexed color and has support for indexed access to custom colors
int okutil_ocolor_LT_color_convert( int nn, BOOL bOColorToLT )
return either OCOLOR or LabTalk color depending on bOColorToLT
EX1
void okutil_ocolor_LT_color_convert_ex1() { int nColor = 10; //convert from OCOLOR to LabTalk color //output:When OCOLOR value is 10 the LabTalk color value converted is 11 int nRet = okutil_ocolor_LT_color_convert(nColor , true ); printf("When OCOLOR value is %d the LabTalk color value converted is %d \n", nColor, nRet); //convert from LabTalk Color to OCOLOR //output:When LabTalk color value is 10 the OCOLOR value converted is 9 nRet = okutil_ocolor_LT_color_convert(nColor , false ); printf("When LabTalk color value is %d the OCOLOR value converted is %d \n", nColor, nRet); }
origin.h