Skip to main content

OfficeColor Class

A color used in Office documents.

Declaration

public class OfficeColor extends JavaObject

Remarks

The OfficeColor class includes a unified representation of colors that you can use in Office documents. It supports multiple color models including RGB, scRGB, HSL, theme scheme colors, preset colors, and system colors.

Use the getType() method to determine the color type, and the corresponding methods (getRgbColor(), getSchemeColor(), getHSL(), etc.) to access the specific color value.

The getTransforms() method returns color transformations such as tint, shade, or alpha modifications.

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
com.devexpress.system.JavaObject
OfficeColor

Constructors

OfficeColor(Color rgbColor) Constructor

Initializes a new instance of the OfficeColor class with specified settings.

Declaration

public OfficeColor(Color rgbColor)

Parameters

Name Type Description
rgbColor Color

The RGB color value.

OfficeColor(HslColor hsl) Constructor

Initializes a new instance of the OfficeColor class with specified settings.

Declaration

public OfficeColor(HslColor hsl)

Parameters

Name Type Description
hsl HslColor

The HSL color value.

OfficeColor(SchemeColors schemeColor) Constructor

Initializes a new instance of the OfficeColor class with specified settings.

Declaration

public OfficeColor(SchemeColors schemeColor)

Parameters

Name Type Description
schemeColor SchemeColors

The theme scheme color.

OfficeColor(ScRgbColor scRgb) Constructor

Initializes a new instance of the OfficeColor class with specified settings.

Declaration

public OfficeColor(ScRgbColor scRgb)

Parameters

Name Type Description
scRgb ScRgbColor

The scRGB color value.

OfficeColor(String preset) Constructor

Initializes a new instance of the OfficeColor class with specified settings.

Declaration

public OfficeColor(String preset)

Parameters

Name Type Description
preset String

A preset color name.

OfficeColor(SystemColors systemColor) Constructor

Initializes a new instance of the OfficeColor class with specified settings.

Declaration

public OfficeColor(SystemColors systemColor)

Parameters

Name Type Description
systemColor SystemColors

The system color.

Methods

clone() Method

Creates a copy of the current object.

Declaration

public OfficeColor clone()

Returns

Type Description
OfficeColor

The OfficeColor object this method creates.

getHSL() Method

Gets the HSL (Hue, Saturation, Lightness) color value.

Declaration

public HslColor getHSL()

Returns

Type Description
HslColor

An HslColor value.

getPreset() Method

Gets the preset color name.

Declaration

public String getPreset()

Returns

Type Description
String

A preset color name.

getRgbColor() Method

Gets the RGB color value.

Declaration

public Color getRgbColor()

Returns

Type Description
Color

A Color value.

getSchemeColor() Method

Gets the theme scheme color.

Declaration

public SchemeColors getSchemeColor()

Returns

Type Description
SchemeColors

A SchemeColors enumeration value.

getScRgb() Method

Gets the scRGB (extended RGB) color value.

Declaration

public ScRgbColor getScRgb()

Returns

Type Description
ScRgbColor

An ScRgbColor value.

getSystemColor() Method

Gets the system color.

Declaration

public SystemColors getSystemColor()

Returns

Type Description
SystemColors

A SystemColors enumeration value.

getTransforms() Method

Gets the collection of color transformations applied to the color.

Declaration

public ITransformList getTransforms()

Returns

Type Description
com.devexpress.docs.ITransformList

The collection of color transformations.

getType() Method

Gets the color type.

Declaration

public OfficeColorType getType()

Returns

Type Description
OfficeColorType

An OfficeColorType enumeration value.