Global Variable

kCMTextMarkupAttribute_BackgroundColorARGB

The background color for the shape holding the text.

Declaration

let kCMTextMarkupAttribute_BackgroundColorARGB: CFString

Discussion

Value must be a CFArray of 4 CFNumbers representing alpha, red, green, and blue fields with values between 0.0 and 1.0. The red, green and blue components are interpreted in the sRGB color space. The alpha indicates the opacity from 0.0 for transparent to 1.0 for 100% opaque.

The color applies to the geometry (for example, a box) containing the text. The container's background color may have an alpha of 0 so it is not displayed even though the text is displayed. The color behind individual characters is optionally controllable with the kCMTextMarkupAttribute_CharacterBackgroundColorARGB attribute.

If used, this attribute must be applied to the entire attributed string.