Skip to contents

fill_solid() is the trivial member of the fill_*() family: a plain colour needs no grid::pattern() machinery, since grid::gpar()'s fill argument already accepts a colour string directly. It exists so that a plain colour can be requested with the same fill_*() naming as the pattern-based helpers (grouping them together in autocomplete), and so style()'s fill property has one uniform family of constructors to accept – including for its own default – once it's extended to take fill_*() outputs alongside a bare colour string.

Usage

fill_solid(color = "black")

Arguments

color

Fill colour. Default "black".

Value

A fill object wrapping color.

Examples

fill_solid("steelblue")
#> <sketchpad::fill>
#>  @ value  : chr "steelblue"
#>  @ resolve: NULL
draw(shape_circle(fill = fill_solid("tomato")))


# equivalent to passing the colour string directly, since style()'s own
# `fill` default is fill_solid("black")
draw(shape_circle(fill = "tomato"))