HslColor Class
Hue, Saturation, Luminance Color Model.When the object is serialized out as xml, its qualified name is a:hslClr.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Drawing.HslColor
Namespace: DocumentFormat.OpenXml.Drawing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
<ChildElementInfoAttribute(GetType(Tint))> _
<ChildElementInfoAttribute(GetType(Shade))> _
<ChildElementInfoAttribute(GetType(Complement))> _
<ChildElementInfoAttribute(GetType(Inverse))> _
<ChildElementInfoAttribute(GetType(Gray))> _
<ChildElementInfoAttribute(GetType(Alpha))> _
<ChildElementInfoAttribute(GetType(AlphaOffset))> _
<ChildElementInfoAttribute(GetType(AlphaModulation))> _
<ChildElementInfoAttribute(GetType(Hue))> _
<ChildElementInfoAttribute(GetType(HueOffset))> _
<ChildElementInfoAttribute(GetType(HueModulation))> _
<ChildElementInfoAttribute(GetType(Saturation))> _
<ChildElementInfoAttribute(GetType(SaturationOffset))> _
<ChildElementInfoAttribute(GetType(SaturationModulation))> _
<ChildElementInfoAttribute(GetType(Luminance))> _
<ChildElementInfoAttribute(GetType(LuminanceOffset))> _
<ChildElementInfoAttribute(GetType(LuminanceModulation))> _
<ChildElementInfoAttribute(GetType(Red))> _
<ChildElementInfoAttribute(GetType(RedOffset))> _
<ChildElementInfoAttribute(GetType(RedModulation))> _
<ChildElementInfoAttribute(GetType(Green))> _
<ChildElementInfoAttribute(GetType(GreenOffset))> _
<ChildElementInfoAttribute(GetType(GreenModulation))> _
<ChildElementInfoAttribute(GetType(Blue))> _
<ChildElementInfoAttribute(GetType(BlueOffset))> _
<ChildElementInfoAttribute(GetType(BlueModulation))> _
<ChildElementInfoAttribute(GetType(Gamma))> _
<ChildElementInfoAttribute(GetType(InverseGamma))> _
Public Class HslColor _
Inherits OpenXmlCompositeElement
'Usage
Dim instance As HslColor
[ChildElementInfoAttribute(typeof(Tint))]
[ChildElementInfoAttribute(typeof(Shade))]
[ChildElementInfoAttribute(typeof(Complement))]
[ChildElementInfoAttribute(typeof(Inverse))]
[ChildElementInfoAttribute(typeof(Gray))]
[ChildElementInfoAttribute(typeof(Alpha))]
[ChildElementInfoAttribute(typeof(AlphaOffset))]
[ChildElementInfoAttribute(typeof(AlphaModulation))]
[ChildElementInfoAttribute(typeof(Hue))]
[ChildElementInfoAttribute(typeof(HueOffset))]
[ChildElementInfoAttribute(typeof(HueModulation))]
[ChildElementInfoAttribute(typeof(Saturation))]
[ChildElementInfoAttribute(typeof(SaturationOffset))]
[ChildElementInfoAttribute(typeof(SaturationModulation))]
[ChildElementInfoAttribute(typeof(Luminance))]
[ChildElementInfoAttribute(typeof(LuminanceOffset))]
[ChildElementInfoAttribute(typeof(LuminanceModulation))]
[ChildElementInfoAttribute(typeof(Red))]
[ChildElementInfoAttribute(typeof(RedOffset))]
[ChildElementInfoAttribute(typeof(RedModulation))]
[ChildElementInfoAttribute(typeof(Green))]
[ChildElementInfoAttribute(typeof(GreenOffset))]
[ChildElementInfoAttribute(typeof(GreenModulation))]
[ChildElementInfoAttribute(typeof(Blue))]
[ChildElementInfoAttribute(typeof(BlueOffset))]
[ChildElementInfoAttribute(typeof(BlueModulation))]
[ChildElementInfoAttribute(typeof(Gamma))]
[ChildElementInfoAttribute(typeof(InverseGamma))]
public class HslColor : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
Tint <a:tint>
Shade <a:shade>
Complement <a:comp>
Inverse <a:inv>
Gray <a:gray>
Alpha <a:alpha>
AlphaOffset <a:alphaOff>
AlphaModulation <a:alphaMod>
Hue <a:hue>
HueOffset <a:hueOff>
HueModulation <a:hueMod>
Saturation <a:sat>
SaturationOffset <a:satOff>
SaturationModulation <a:satMod>
Luminance <a:lum>
LuminanceOffset <a:lumOff>
LuminanceModulation <a:lumMod>
Red <a:red>
RedOffset <a:redOff>
RedModulation <a:redMod>
Green <a:green>
GreenOffset <a:greenOff>
GreenModulation <a:greenMod>
Blue <a:blue>
BlueOffset <a:blueOff>
BlueModulation <a:blueMod>
Gamma <a:gamma>
InverseGamma <a:invGamma>
[ISO/IEC 29500-1 1st Edition]
20.1.2.3.13 hslClr (Hue, Saturation, Luminance Color Model)
This element specifies a color using the HSL color model. A perceptual gamma of 2.2 is assumed.
Hue refers to the dominant wavelength of color, saturation refers to the purity of its hue, and luminance refers to its lightness or darkness.
As with all colors, colors defined with the HSL color model can have color transforms applied to it.
[Example:
The color blue having RGB value RRGGBB = (00, 00, 80) is equivalent to
<a:solidFill>
<a:hslClr hue="14400000" sat="100.000%" lum="50.000%">
</a:solidFill>
end example]
Parent Elements |
---|
accent1 (§20.1.4.1.1); accent2 (§20.1.4.1.2); accent3 (§20.1.4.1.3); accent4 (§20.1.4.1.4); accent5 (§20.1.4.1.5); accent6 (§20.1.4.1.6); alphaInv (§20.1.8.4); bgClr (§20.1.8.10); bgRef (§19.3.1.3); buClr (§21.1.2.4.4); clrFrom (§20.1.8.17); clrMru (§19.2.1.4); clrRepl (§20.1.8.18); clrTo (§20.1.8.19); clrVal (§19.5.27); contourClr (§20.1.5.6); custClr (§20.1.4.1.8); dk1 (§20.1.4.1.9); dk2 (§20.1.4.1.10); duotone (§20.1.8.23); effectClrLst (§21.4.4.7); effectRef (§20.1.4.2.8); extrusionClr (§20.1.5.7); fgClr (§20.1.8.27); fillClrLst (§21.4.4.8); fillRef (§20.1.4.2.10); folHlink (§20.1.4.1.15); fontRef (§20.1.4.1.17); from (§19.5.43); glow (§20.1.8.32); gs (§20.1.8.36); highlight (§21.1.2.3.4); hlink (§20.1.4.1.19); innerShdw (§20.1.8.40); linClrLst (§21.4.4.9); lnRef (§20.1.4.2.19); lt1 (§20.1.4.1.22); lt2 (§20.1.4.1.23); outerShdw (§20.1.8.45); penClr (§19.2.1.23); prstShdw (§20.1.8.49); solidFill (§20.1.8.54); tcTxStyle (§20.1.4.2.30); to (§19.5.90); txEffectClrLst (§21.4.4.12); txFillClrLst (§21.4.4.13); txLinClrLst (§21.4.4.14) |
Child Elements |
Subclause |
---|---|
alpha (Alpha) |
§20.1.2.3.1 |
alphaMod (Alpha Modulation) |
§20.1.2.3.2 |
alphaOff (Alpha Offset) |
§20.1.2.3.3 |
blue (Blue) |
§20.1.2.3.4 |
blueMod (Blue Modification) |
§20.1.2.3.5 |
blueOff (Blue Offset) |
§20.1.2.3.6 |
comp (Complement) |
§20.1.2.3.7 |
gamma (Gamma) |
§20.1.2.3.8 |
gray (Gray) |
§20.1.2.3.9 |
green (Green) |
§20.1.2.3.10 |
greenMod (Green Modification) |
§20.1.2.3.11 |
greenOff (Green Offset) |
§20.1.2.3.12 |
hue (Hue) |
§20.1.2.3.14 |
hueMod (Hue Modulate) |
§20.1.2.3.15 |
hueOff (Hue Offset) |
§20.1.2.3.16 |
inv (Inverse) |
§20.1.2.3.17 |
invGamma (Inverse Gamma) |
§20.1.2.3.18 |
lum (Luminance) |
§20.1.2.3.19 |
lumMod (Luminance Modulation) |
§20.1.2.3.20 |
lumOff (Luminance Offset) |
§20.1.2.3.21 |
red (Red) |
§20.1.2.3.23 |
redMod (Red Modulation) |
§20.1.2.3.24 |
redOff (Red Offset) |
§20.1.2.3.25 |
sat (Saturation) |
§20.1.2.3.26 |
satMod (Saturation Modulation) |
§20.1.2.3.27 |
satOff (Saturation Offset) |
§20.1.2.3.28 |
shade (Shade) |
§20.1.2.3.31 |
tint (Tint) |
§20.1.2.3.34 |
Attributes |
Description |
---|---|
hue (Hue) |
Specifies the angular value describing the wavelength. Expressed in 1/6000ths of a degree. The possible values for this attribute are defined by the ST_PositiveFixedAngle simple type (§20.1.10.44). |
lum (Luminance) |
Specifies the luminance referring to the lightness or darkness of the color. Expressed as a percentage with 0% referring to maximal dark (black) and 100% referring to maximal white. The possible values for this attribute are defined by the ST_Percentage simple type (§20.1.10.40). |
sat (Saturation) |
Specifies the saturation referring to the purity of the hue. Expressed as a percentage with 0% referring to grey, 100% referring to the purest form of the hue. The possible values for this attribute are defined by the ST_Percentage simple type (§20.1.10.40). |
[Note: The W3C XML Schema definition of this element’s content model (CT_HslColor) is located in §A.4.1. end note]
© ISO/IEC29500: 2008.
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.