2.1.6.26 okutil_ocolor_to_HTML


Description

Convert an Origin OColor into an HTML hex color string

Syntax

BOOL okutil_ocolor_to_HTML(OCOLOR nColor, string* pstr)

Parameters

nColor
[input] Origin OColor
pstr
[output] pointer to string to receive the HTML color hex. (invalid input will return #000000)

Return

Return FALSE if pstr = NULL,TRUE otherwise.

Examples

EX1

void okutil_ocolor_to_HTML_Ex1()
{
	OCOLOR cc = okutil_HTML_to_ocolor("#0f0");
	string str;
	okutil_ocolor_to_HTML(cc, &str);
	out_str(str);//#00FF00
}

Remark

See Also

okutil_HTML_to_ocolor

Header to Include

origin.h

Reference