Table of Contents

Class OColor

Namespace
Spire.Xls
Assembly
Spire.XLS.dll

This object used to store, convert colors.

public class OColor : IDisposable
Inheritance
OColor
Implements
Inherited Members

Constructors

OColor()

public OColor()

OColor(Color)

public OColor(Color rgb)

Parameters

rgb Color

Properties

ColorType

Returns type of the stored color.

public ColorType ColorType { get; }

Property Value

ColorType

Tint

Gets or sets Tint.

public double Tint { get; set; }

Property Value

double

Value

Returns color value (it can be index, rgb color, etc.)

public int Value { get; }

Property Value

int

Methods

Dispose()

public void Dispose()

Equals(object)

Determines whether the specified Object is equal to the current Object.

public override bool Equals(object obj)

Parameters

obj object

The Object to compare with the current Object.

Returns

bool

true if the specified Object is equal to the current Object; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

GetKnownColor(Workbook)

public ExcelColors GetKnownColor(Workbook book)

Parameters

book Workbook

Returns

ExcelColors

GetThemeColor(out int, out double)

public bool GetThemeColor(out int themeIndex, out double tint)

Parameters

themeIndex int
tint double

Returns

bool

SetKnownColor(ExcelColors)

Sets known color.

public void SetKnownColor(ExcelColors value)

Parameters

value ExcelColors

Excel color to set.

SetRGB(Color, IWorkbook, double)

public void SetRGB(Color rgb, IWorkbook book, double dTintValue)

Parameters

rgb Color
book IWorkbook
dTintValue double

SetTheme(int, IWorkbook)

public void SetTheme(int themeIndex, IWorkbook book)

Parameters

themeIndex int
book IWorkbook

SetTheme(int, IWorkbook, double)

public void SetTheme(int themeIndex, IWorkbook book, double dTintValue)

Parameters

themeIndex int
book IWorkbook
dTintValue double