Skip to contents

Returns a light theme. All parameters have sensible defaults; most users only need base_font_size. Title font size defaults to 1.2x the base; all other text defaults to 1x. Data-zoom sliders use neutral gray controls, including their data preview and hover states. Explicit component styles override these theme defaults.

Usage

theme_light(
  base_font_size = 12,
  title_font_size = NULL,
  subtitle_font_size = NULL,
  axis_label_font_size = NULL,
  legend_font_size = NULL,
  tooltip_font_size = NULL,
  font_family = "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
  color = palette_colors(rtemis_colors),
  bg_color = "#ffffff",
  fg_color = "rgba(0, 0, 0, 0.7)",
  title_color = NULL,
  subtitle_color = NULL,
  legend_color = NULL,
  axis_color = NULL,
  grid_color = NULL,
  tooltip_bg = NULL,
  tooltip_border_color = NULL,
  tooltip_color = NULL
)

Arguments

base_font_size

Numeric [0, Inf): Base font size in pixels for all text.

title_font_size

Optional Numeric [0, Inf): Title font size.

subtitle_font_size

Optional Numeric [0, Inf): Subtitle font size.

axis_label_font_size

Optional Numeric [0, Inf): Axis-label font size.

legend_font_size

Optional Numeric [0, Inf): Legend font size.

tooltip_font_size

Optional Numeric [0, Inf): Tooltip font size.

font_family

Character: Font family string.

color

Character: Color palette.

bg_color

Optional Character: Chart background color.

fg_color

Optional Character: Global text color.

title_color

Optional Character: Title text color.

subtitle_color

Optional Character: Subtitle text color.

legend_color

Optional Character: Legend text color.

axis_color

Optional Character: Axis line color.

grid_color

Optional Character: Grid or split-line color.

tooltip_bg

Optional Character: Tooltip background color.

tooltip_border_color

Optional Character: Tooltip border color.

tooltip_color

Optional Character: Tooltip text color.

Value

Theme: Theme object.

Examples

theme_light(base_font_size = 14)
#> <rtemis.draw::Theme>
#>  @ color           : chr [1:15] "#6CA3A0" "#F08904" "#BE2E5F" "#B3CFE8" "#0F6A66" ...
#>  @ background_color: chr "#ffffff"
#>  @ text_style      : <rtemis.draw::TextStyle>
#>  .. @ color                  : chr "rgba(0, 0, 0, 0.7)"
#>  .. @ font_style             : NULL
#>  .. @ font_weight            : NULL
#>  .. @ font_family            : chr "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
#>  .. @ font_size              : num 14
#>  .. @ align                  : NULL
#>  .. @ vertical_align         : NULL
#>  .. @ opacity                : NULL
#>  .. @ line_height            : NULL
#>  .. @ background_color       : NULL
#>  .. @ border_color           : NULL
#>  .. @ border_width           : NULL
#>  .. @ border_type            : NULL
#>  .. @ border_dash_offset     : NULL
#>  .. @ border_radius          : NULL
#>  .. @ padding                : NULL
#>  .. @ width                  : NULL
#>  .. @ height                 : NULL
#>  .. @ text_border_color      : NULL
#>  .. @ text_border_width      : NULL
#>  .. @ text_border_type       : NULL
#>  .. @ text_border_dash_offset: NULL
#>  .. @ text_shadow_blur       : NULL
#>  .. @ text_shadow_color      : NULL
#>  .. @ text_shadow_offset_x   : NULL
#>  .. @ text_shadow_offset_y   : NULL
#>  .. @ overflow               : NULL
#>  .. @ ellipsis               : NULL
#>  .. @ rich                   : NULL
#>  .. @ shadow_blur            : NULL
#>  .. @ shadow_color           : NULL
#>  .. @ shadow_offset_x        : NULL
#>  .. @ shadow_offset_y        : NULL
#>  @ title           :List of 2
#>  .. $ textStyle   :List of 1
#>  ..  ..$ fontSize: num 17
#>  .. $ subtextStyle:List of 1
#>  ..  ..$ fontSize: num 14
#>  @ legend          :List of 1
#>  .. $ textStyle:List of 2
#>  ..  ..$ color   : chr "rgba(0, 0, 0, 0.7)"
#>  ..  ..$ fontSize: num 14
#>  @ tooltip         :List of 1
#>  .. $ textStyle:List of 2
#>  ..  ..$ color   : chr "rgba(0, 0, 0, 0.7)"
#>  ..  ..$ fontSize: num 14
#>  @ data_zoom       :List of 10
#>  .. $ backgroundColor       : chr "rgba(128,128,128,0.06)"
#>  .. $ borderColor           : chr "#b0b0b0"
#>  .. $ fillerColor           : chr "rgba(128,128,128,0.18)"
#>  .. $ dataBackground        :List of 2
#>  ..  ..$ lineStyle:List of 1
#>  ..  .. ..$ color: chr "#808080"
#>  ..  ..$ areaStyle:List of 2
#>  ..  .. ..$ color  : chr "#808080"
#>  ..  .. ..$ opacity: num 0.12
#>  .. $ selectedDataBackground:List of 2
#>  ..  ..$ lineStyle:List of 1
#>  ..  .. ..$ color: chr "#707070"
#>  ..  ..$ areaStyle:List of 2
#>  ..  .. ..$ color  : chr "#808080"
#>  ..  .. ..$ opacity: num 0.25
#>  .. $ handleStyle           :List of 2
#>  ..  ..$ color      : chr "#ffffff"
#>  ..  ..$ borderColor: chr "#808080"
#>  .. $ moveHandleStyle       :List of 2
#>  ..  ..$ color  : chr "#909090"
#>  ..  ..$ opacity: num 0.6
#>  .. $ brushStyle            :List of 2
#>  ..  ..$ color  : chr "#808080"
#>  ..  ..$ opacity: num 0.3
#>  .. $ textStyle             :List of 2
#>  ..  ..$ fontSize: num 14
#>  ..  ..$ color   : chr "rgba(0, 0, 0, 0.7)"
#>  .. $ emphasis              :List of 2
#>  ..  ..$ handleStyle    :List of 1
#>  ..  .. ..$ borderColor: chr "#505050"
#>  ..  ..$ moveHandleStyle:List of 1
#>  ..  .. ..$ color: chr "#707070"
#>  @ line            :List of 1
#>  .. $ symbol: chr "circle"
#>  @ bar             : NULL
#>  @ pie             : NULL
#>  @ scatter         : NULL
#>  @ category_axis   :List of 2
#>  .. $ axisLabel:List of 2
#>  ..  ..$ fontSize: num 14
#>  ..  ..$ color   : chr "rgba(0, 0, 0, 0.7)"
#>  .. $ splitLine:List of 1
#>  ..  ..$ show: logi FALSE
#>  @ value_axis      :List of 1
#>  .. $ axisLabel:List of 2
#>  ..  ..$ fontSize: num 14
#>  ..  ..$ color   : chr "rgba(0, 0, 0, 0.7)"
#>  @ log_axis        : NULL
#>  @ time_axis       : NULL