Export (0) Print
Expand All
Expand Minimize

2.1.71 Part 1 Section 17.3.2.6, color (Run Content Color)

For additional notes that apply to this portion of the standard, please see the notes for color, §17.15.2.5(a) .

a. The standard specifies an algorithm for themeShade calculations that is different from themeShade calculations in other subclauses.

Given an RGB color defined as three hex values in RRGGBB format, the shade is applied as follows:

Convert the color to the HSL color format (values from 0 to 1).

Modify the luminance factor as follows:

Ff532470.dcee9165-3730-48a6-992f-bce9c83dbc1a(en-us,office.12).jpg

Convert the resultant HSL color to RGB.

If this attribute is specified in the color element ("[ISO/IEC-29500-1] §17.15.2.5; color (Frameset Splitter Color)") nested inside a framesetSplitbar ("[ISO/IEC-29500-1] §17.15.2.20; framesetSplitbar (Frameset Splitter Properties)") element, Word deviates from this behavior. Refer to the themeColor attribute description.

[Example: Consider a document with a background using the accent2 theme color, whose RGB value (in RRGGBB hex format) is C0504D.

The equivalent HSL color value would beFf532470.9c6b3cc4-5518-4ce1-aa82-b2e75dcbcc7f(en-us,office.12).jpg.

Applying the shade formula with a shade percentage of 75% to the luminance, the result is:

Ff532470.0f93520a-cd53-4205-99c0-45c53dc8675e(en-us,office.12).jpg

Ff532470.1e8200a8-58d9-4803-bec7-48f211ca86ff(en-us,office.12).jpg

Taking the resulting HSL color value of Ff532470.1f62b1b3-31bd-4c3e-81df-c4b90cd7e7e3(en-us,office.12).jpgand converting back to RGB, the result is 943634.

This transformed value can be seen in the resulting run color WordprocessingML's val attribute:

<w:color w:val="943634" w:themeColor="accent2" w:themeShade="BF" />

end example]

b. The standard does not state which setting is applied when both the themeShade and the themeTint attributes are present.

Word applies the themeTint setting when both of these attributes are present.

c. The standard describes an algorithm for themeTint calculations that is different from themeTint calculations in other subclauses.

In Word, the themeTint attribute is calculated using the following algorithm:

Given an RGB color defined as three hex values in RRGGBB format, the shade is applied as follows:

Convert the color to the HSL color format (values from 0 to 1).

Modify the luminance factor as follows:

Ff532470.e83a7735-a0d3-45d7-8e37-3ead60b9f5bb(en-us,office.12).jpg

Convert the resultant HSL color to RGB.

If this attribute is specified in the color element ("[ISO/IEC-29500-1] §17.15.2.5; color (Frameset Splitter Color)") nested inside a framesetSplitbar element ("[ISO/IEC-29500-1] §17.15.2.20; framesetSplitbar (Frameset Splitter Properties)"), Word will not use the specified theme color but rather will use an RGB color based on the themeShade and themeTint attributes. The intensity of the red, green, and blue components of this RGB color range from 0 to 255. The value of themeTint shall specify the intensity of the red component. If the themeTint attribute is omitted, the intensity of the red component shall default to 255. The value of themeShade shall specify the intensity of the green component. If the themeShade attribute is omitted, the intensity of the green component shall default to 255. The intensity of the blue component shall be 0.

[Example: Consider a document with a background using the accent2 theme color, whose RGB value (in RRGGBB hex format) is 4F81BD.

The equivalent HSL color value would beFf532470.d30e07b4-6fc5-42ed-9bde-cec8f087305a(en-us,office.12).jpg.

Applying the tint formula with a tint percentage of 60% to the luminance, the result is:

Ff532470.c249dd77-78a8-4a50-93c6-054600e9493f(en-us,office.12).jpg

Ff532470.a87849f3-c50e-4d2d-b504-1ef0a127ae02(en-us,office.12).jpg

Taking the resulting HSL color value of Ff532470.a26176e9-c1f2-4a58-acf9-a9ae9a8d6312(en-us,office.12).jpg and converting back to RGB, the result is 95B3D7.

This transformed value can be seen in the resulting background's color attribute:

<w:top w:val="single" w:sz="4" w:space="24"
  w:color="95B3D7" w:themeColor="accent2" 
  w:themeTint="99"/>

end example]

Show:
© 2014 Microsoft