System::Drawing::ColorTranslator Class Reference

Static Public Member Functions

static Color FromWin32 (int win32_color)
 
static Color FromHtml (const System::String &name)
 
static String ToHtml (const Color &color)
 

Detailed Description

Performs color translations. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

Member Function Documentation

◆ FromHtml()

static Color System::Drawing::ColorTranslator::FromHtml ( const System::String name)
static

Converts the specified HTML color representation to the equvivalent Color object.

Parameters
nameThe name of HTML color to translate
Returns
A Color object that represents the specified HTML color

◆ FromWin32()

static Color System::Drawing::ColorTranslator::FromWin32 ( int  win32_color)
static

Converts the specified Windows color to the equvivalent Color object.

Parameters
win32_colorThe Windows color to convert
Returns
A Color object that represents the specified Windows color

◆ ToHtml()

static String System::Drawing::ColorTranslator::ToHtml ( const Color color)
static

Converts the specified Color object to the string representation of equivalent HTML color.

Parameters
colorA Color object to translate
Returns
The name of HTML color equivalent to the color represented by color