Class ColorTranslator

Class ColorTranslator

Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.2.0)

Translates colors to and from GDI+ Color structures. This class cannot be inherited.

public sealed class ColorTranslator

Inheritance

objectColorTranslator

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods

FromHtml(string)

Takes color from the HTML color.

public static Color FromHtml(string htmlColor)

Parameters

htmlColor string

HTML color.

Returns

Color

The color.

FromOle(int)

Takes color from the OLE color.

public static Color FromOle(int oleColor)

Parameters

oleColor int

OLE color.

Returns

Color

The color.

FromWin32(int)

Takes color from the HTML color.

public static Color FromWin32(int win32Color)

Parameters

win32Color int

Win32 color.

Returns

Color

The color.

ToHtml(Color)

Creates HTML color from the color.

public static string ToHtml(Color c)

Parameters

c Color

The color class.

Returns

string

The html string color.

ToOle(Color)

Translates OLE color to color.

public static int ToOle(Color c)

Parameters

c Color

The color.

Returns

int

The OLE color.

ToWin32(Color)

Translates the color to win32 color.

public static int ToWin32(Color c)

Parameters

c Color

The color.

Returns

int

The win32 color.