Partager via


AnimateColor Class

Animate Color Behavior.When the object is serialized out as xml, its qualified name is p:animClr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Presentation.AnimateColor

Namespace:  DocumentFormat.OpenXml.Presentation
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(ToColor))> _
<ChildElementInfoAttribute(GetType(CommonBehavior))> _
<ChildElementInfoAttribute(GetType(ByColor))> _
<ChildElementInfoAttribute(GetType(FromColor))> _
Public Class AnimateColor _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As AnimateColor
[ChildElementInfoAttribute(typeof(ToColor))]
[ChildElementInfoAttribute(typeof(CommonBehavior))]
[ChildElementInfoAttribute(typeof(ByColor))]
[ChildElementInfoAttribute(typeof(FromColor))]
public class AnimateColor : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • CommonBehavior <p:cBhvr>

  • ByColor <p:by>

  • FromColor <p:from>

  • ToColor <p:to>

[ISO/IEC 29500-1 1st Edition]

19.5.2 animClr (Animate Color Behavior)

This animation element is responsible for animating the color of an object.

[Example: Consider trying to emphasize a shape by changing its fill color to scheme color accent2. The <animClr> element should be used as follows:

<p:animClr clrSpc="rgb">
  <p:cBhvr>
    <p:cTn id="1" dur="2000" fill="hold"/>
    <p:tgtEl>
      <p:spTgt spid="1"/>
    </p:tgtEl>
    <p:attrNameLst>
      <p:attrName>fillcolor</p:attrName>
    </p:attrNameLst>
  </p:cBhvr>
  <p:to>
    <a:schemeClr val="accent2"/>
  </p:to>
</p:animClr>

end example]

Parent Elements

childTnLst (§19.5.25); subTnLst (§19.5.78); tnLst (§19.5.87)

Child Elements

Subclause

by (By)

§19.5.20

cBhvr (Common Behavior)

§19.5.22

from (From)

§19.5.43

to (To)

§19.5.90

Attributes

Description

clrSpc (Color Space)

This attribute specifies the color space in which to interpolate the animation. Values for example can be HSL & RGB.

 

The values for from/to/by/etc. can still be specified in any supported color format without affecting the color space within which the animation happens.

 

The RGB color space is best used for doing animations between two different colors since it doesn't require going through any other hues between the two colors specified. The HSL space is useful for animating through a rainbow of colors or for modifying just the saturation by 30% for example.

The possible values for this attribute are defined by the ST_TLAnimateColorSpace simple type (§19.7.23).

dir (Direction)

This attribute specifies which direction to cycle the hue around the color wheel. Values are clockwise or counter clockwise. Default is clockwise.

The possible values for this attribute are defined by the ST_TLAnimateColorDirection simple type (§19.7.22).

[Note: The W3C XML Schema definition of this element’s content model (CT_TLAnimateColorBehavior) is located in §A.3. 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.

See Also

Reference

AnimateColor Members

DocumentFormat.OpenXml.Presentation Namespace