auto_resolve_theme: Resolve auto values

View source: R/auto.R

auto_resolve_themeR Documentation

Resolve auto values

Description

Resolves 'auto' values based on the current execution environment and configuration (i.e., auto_config_get()).

Usage

auto_resolve_theme(theme)

Arguments

theme

a thematic_theme() object.

Value

The theme object with resolved 'auto' values.

See Also

auto_config_set()

Examples


old_config <- auto_config_set(auto_config(bg = "black", fg = "white"))

# Resolving auto values in local theme objects
theme <- thematic_theme()
theme[c("bg", "fg")]
theme <- auto_resolve_theme(theme)
theme[c("bg", "fg")]

# By default, auto values are resolved when accessing
# global theme options
thematic_on()
thematic_get_option("bg", resolve = FALSE)
thematic_get_option("bg")
thematic_off()

auto_config_set(old_config)


thematic documentation built on Nov. 4, 2023, 9:07 a.m.