Stylesheet Development with PTC ALD > Adding PTC ALD Code to Stylesheet Source > Samples > Colors > Set Text, Line, and Background Color > Strikethrough Color
Strikethrough Color
The samples listed here describe how to set text strikethrough color based on a standard method of describing the color - CMYK.
Refer to the emphasis everywhere context in the Arbortext-path/samples/ALD/Colour/SettingColours.xml sample file. The context includes a set of conditions based on the value of the role attribute in the associated stylesheet. Each condition references a different property set.
For example, the condition ELSE IF attribute “role” = “CMYK strikethrough colour” of the emphasis everywhere context references the CMYK strikethrough colour property set. This property set sets a text strikethough color in CMYK format, where each of the four values is specified as a number in the range 0-255. The relevant code in that property set is given below.
style.strikethroughRule.color = "cmyk(20,184,148,1)";
Here you have added a strikethroughRule property to the styling assigned to the inline text. That property is based on the fTextRule object, which takes a color property. The value of color is described in CMYK format.
Note that this code does not apply a strikethrough to the text. That is handled via a property setting in the Text property category in the Arbortext Styler UI.