RgbColorModelHex Class

Defines the RgbColorModelHex Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is w14:srgbClr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office2010.Word.RgbColorModelHex

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Shade), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Alpha), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(HueModulation), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Saturation), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(SaturationOffset), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(SaturationModulation), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Luminance), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(LuminanceOffset), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(LuminanceModulation), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Tint), FileFormatVersions.Office2010)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class RgbColorModelHex _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As RgbColorModelHex
[ChildElementInfoAttribute(typeof(Shade), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Alpha), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(HueModulation), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Saturation), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(SaturationOffset), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(SaturationModulation), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Luminance), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(LuminanceOffset), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(LuminanceModulation), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Tint), FileFormatVersions.Office2010)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class RgbColorModelHex : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • Tint <w14:tint>

  • Shade <w14:shade>

  • Alpha <w14:alpha>

  • HueModulation <w14:hueMod>

  • Saturation <w14:sat>

  • SaturationOffset <w14:satOff>

  • SaturationModulation <w14:satMod>

  • Luminance <w14:lum>

  • LuminanceOffset <w14:lumOff>

  • LuminanceModulation <w14:lumMod>

2.5.7 CT_SRgbColor

Target namespace: https://schemas.microsoft.com/office/word/2009/2/wordml

Referenced by: CT_Glow, CT_Shadow, CT_SolidColorFillProperties, CT_GradientStop, CT_Color

Specifies a color using the red, green, blue (RGB) color model. Red, green, and blue are expressed as a sequence of hex digits, RRGGBB. This type optionally specifies a list of color transforms applied to the base color.

Child Elements:

tint : A CT_PositiveFixedPercentage element that specifies a lighter version of its input color. 10% tint is 10% of input color combined with 90% white. By default, color does not have tint.

shade : A CT_PositiveFixedPercentage element that specifies darker version of its input color. 10% shade is 10% of input color combined with 90% black. By default, color does not have shade.

alpha : A CT_PositiveFixedPercentage element that specifies its input color with the specific opacity, but with its color unchanged. By default color does not have alpha.

hueMod : A CT_PositivePercentage element that specifies the input color with its hue modulated by the given percentage. A 50% hue modulate decreases the angular hue value by half. A 200% hue modulate doubles the angular hue value. By default, color does not have modulated hue.

sat : A CT_Percentage element that specifies input color with the specified saturation, but with its hue and luminance unchanged. By default, color does not have saturation.

satOff : A CT_Percentage element that specifies the input color with its saturation shifted, but with its hue and luminance unchanged. A 10% offset to 20% saturation yields 30% saturation. By default, color does not have saturation offset.

satMod : A CT_Percentage element that specifies the input color with its saturation modulated by the given percentage. A 50% saturation modulate reduces the saturation by half. A 200% saturation modulate doubles the saturation. By default, color does not have modulated saturation.

lum : A CT_Percentage element that specifies the input color with the specific luminance, but its hue and saturation unchanged. By default, color does not have luminance.

lumOff : A CT_Percentage element that specifies the input color with its luminance shifted, but with its hue and saturation unchanged. A 10% offset to 20% luminance yields 30% luminance. By default, color does not have luminance offset.

lumMod : A CT_Percentage element that specifies the input color with its luminance modulated by the given percentage. A 50% luminance modulate reduces the luminance by half. A 200% luminance modulate doubles the luminance. By default, color does not have modulated luminance.

Attributes:

val : An ST_HexColorRGB (as specified in [ISO/IEC-29500-1] ยง22.9.2.5) attribute that specifies color in the RGB color model. Red, green, and blue are expressed in hex digits, RRGGBB.

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

<xsd:complexType name="CT_SRgbColor">

<xsd:sequence>

<xsd:group ref="EG_ColorTransform" minOccurs="0" maxOccurs="unbounded"/>

</xsd:sequence>

<xsd:attribute name="val" type="w:ST_HexColorRGB" use="required"/>

</xsd:complexType>

See section 5.1 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

RgbColorModelHex Members

DocumentFormat.OpenXml.Office2010.Word Namespace