A helper function to retrieve the value of style settings as set by a xaringanthemer style function, for use in plotting and other circumstances.
Arguments
- setting
A xaringanthemer style setting
- css_file
Path to a xaringanthemer CSS file, from which the theme variables and values will be inferred. In general, if you use the xaringathemer defaults, you will not need to set this. This feature lets you create a ggplot2 theme for your xaringan slides, even if you have only saved your theme CSS file and you aren't creating your CSS theme with xaringanthemer in your slides' source file.
Style Settings
Style settings used by xaringanthemer include:
background_colorbackground_imagebackground_positionbackground_sizeblockquote_left_border_colorcode_font_familycode_font_family_fallbackcode_font_googlecode_font_is_googlecode_font_sizecode_font_urlcode_highlight_colorcode_inline_background_colorcode_inline_colorcode_inline_font_sizeextra_cssextra_fontsfootnote_colorfootnote_font_sizefootnote_position_bottomheader_background_autoheader_background_colorheader_background_content_padding_topheader_background_ignore_classesheader_background_paddingheader_background_text_colorheader_colorheader_font_familyheader_font_googleheader_font_is_googleheader_font_urlheader_font_weightheader_h1_font_sizeheader_h2_font_sizeheader_h3_font_sizeinverse_background_colorinverse_header_colorinverse_text_colorinverse_text_shadowleft_column_selected_colorleft_column_subtle_colorlink_colorpaddingtable_border_colortable_row_border_colortable_row_even_background_colortext_bold_colortext_colortext_font_basetext_font_familytext_font_family_fallbacktext_font_googletext_font_is_googletext_font_sizetext_font_urltext_font_weighttext_slide_number_colortext_slide_number_font_sizetitle_slide_background_colortitle_slide_background_imagetitle_slide_background_positiontitle_slide_background_sizetitle_slide_text_color
Examples
# Create a xaringanthemer style in a temporary file for this example
xaringan_themer_css <- tempfile("xaringan-themer", fileext = ".css")
style_solarized_light(outfile = xaringan_themer_css)
theme_xaringan_get_value("text_color")
#> [1] "#657b83"
theme_xaringan_get_value("background_color")
#> [1] "#fdf6e3"
theme_xaringan_get_value("header_color")
#> [1] "#dc322f"
theme_xaringan_get_value("text_bold_color")
#> [1] "#d33682"
