ColorScale Class

Defines the ColorScale Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is x14:colorScale.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office2010.Excel.ColorScale

Namespace:  DocumentFormat.OpenXml.Office2010.Excel
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Color), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ConditionalFormattingValueObject), FileFormatVersions.Office2010)> _
Public Class ColorScale _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As ColorScale
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Color), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ConditionalFormattingValueObject), FileFormatVersions.Office2010)]
public class ColorScale : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • ConditionalFormattingValueObject <x14:cfvo>

  • Color <x14:color>

2.6.29 CT_ColorScale

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/main

Referenced by: CT_CfRule

A complex type that specifies a color scale used in conditional formatting.

Child Elements:

cfvo : A CT_Cfvo element that specifies the cell values corresponding to the interpolation colors of the color scale. The CT_ColorScale MUST have either two or three children CT_Cfvo elements.

If there are two children CT_Cfvo elements present, the first child CT_Cfvo element specifies the cell value corresponding to the beginning color of the color scale. The second child CT_Cfvo element specifies the cell value corresponding to the end color of the color scale.

If there are three children CT_Cfvo elements present, the first child CT_Cfvo element specifies the cell value corresponding to the beginning color of the color scale. The second child CT_Cfvo element specifies the cell value corresponding to the midpoint color of the color scale. The third child CT_Cfvo element specifies the cell value corresponding to the end color of the color scale.

color : A CT_Color ([ISO/IEC-29500-4] section A.2) element that specifies the interpolation colors of the color scale for the cfvo element at the same corresponding position. The CT_ColorScale MUST have either two or three children CT_Color ([ISO/IEC-29500-4] section A.2) elements, and the number of children MUST equal the number of CT_Cfvo children.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_ColorScale">

<xsd:sequence>

<xsd:element name="cfvo" type="CT_Cfvo" minOccurs="2" maxOccurs="unbounded"/>

<xsd:element name="color" type="x:CT_Color" minOccurs="2" maxOccurs="unbounded"/>

</xsd:sequence>

</xsd:complexType>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

ColorScale Members

DocumentFormat.OpenXml.Office2010.Excel Namespace