okutil_convert_RGB_to_ocolor

 

Description

convert RGB to OCOLOR

Syntax

OCOLOR okutil_convert_RGB_to_ocolor( COLORREF cr )

Parameters

cr
[input] RGB value, can be constructed using macro RGB

Return

OCOLOR return include Origin internal color index if given input matches one of them.

Examples

void okutil_convert_RGB_to_ocolor_ex1(int clrR, int clrG, int clrB)
{     
        DWORD dwRGB = RGB(clrR, clrG, clrB);
        int nColor = okutil_convert_RGB_to_ocolor(dwRGB);
        out_int("nColor=", nColor);
}

Remark

See Also

okutil_convert_ocolor_to_RGB

header to Included

origin.h

Reference