solid_fill: Solid fill DrawingML fragment

View source: R/ooxml.R

solid_fillR Documentation

Solid fill DrawingML fragment

Description

Build an ⁠<a:solidFill>⁠ block with an sRGB color and an alpha channel. Used inside DrawingML shape properties wrappers such as ⁠<a:spPr>⁠, ⁠<a:ln>⁠, ⁠<a:rPr>⁠, and chartEx-specific wrappers such as ⁠<cx:spPr>⁠.

This is a low-level helper intended for packages that emit OOXML fragments (e.g. mschart, rvg). End users typically rely on higher-level objects (fp_text(), fp_border(), sp_line()) that embed the ⁠<a:solidFill>⁠ block themselves.

Usage

solid_fill(color)

Arguments

color

a color value: a name ("red"), a hex string with or without leading ⁠#⁠ ("#FF0000" or "FF0000"), or "transparent". Anything accepted by grDevices::col2rgb() works; the alpha channel is honored.

Value

a character string with the OOXML fragment, namespaced ⁠a:⁠.

Examples

solid_fill("red")
solid_fill("#3366CC")

officer documentation built on July 16, 2026, 5:09 p.m.