Demonstrate all defined themes

colorDF_themes_show(themes = NULL, force_bg = FALSE)

Arguments

themes

character vector with theme names to show

force_bg

force background to "white" for light themes and "black" for dark themes

Details

"Themes" are simply predefined styles for colorful data frames. Some are suitable only for dark or light backgrounds, so this function is useful for choosing what looks best on your terminal.

When a colorful data frame is created with colorDF() or as.colorDF(), the default theme is assigned to it. The default theme is defined by the option "colorDF_theme" set using options() (at startup, the default theme is "light").

You can also specify the theme to use when making a data frame colorful with colorDF() by using the theme= parameter.

Examples

colorDF_themes_show()
#> Theme light - Suitable for black on white terminals:
#> # Color data frame (class colorDF) 7 x 3:
#>  │ID   │String   │Factor│Number│Integer│Logical│Pvalue
#> 1  ID1foo      foo     12.1     12TRUE   0.001 
#> 2  ID2baz      baz     -3.1    -13FALSE  0.314 
#> 3  ID3highlightboo      2.7     42NA     NA    
#> 
#> Theme minimal - Almost no style:
#> # Color data frame (class colorDF) 7 x 3:
#>   ID    String    Factor Number            Integer Logical Pvalue  
#> 1 ID1   foo       foo    12.1              12      TRUE    0.001   
#> 2 ID2   baz       baz    -3.14159265358979 -13     FALSE   0.314159
#> 3 ID3   highlight boo    2.71828182845905  42      NA      NA      
#> 
#> Theme universal - Suitable for all terminals:
#> # Color data frame (class colorDF) 7 x 3:
#>  │ID   │String   │Factor│Number│Integer│Logical│Pvalue
#> 1  ID1foo      foo     12.1     12TRUE   0.001 
#> 2  ID2baz      baz     -3.1    -13FALSE  │0.314 
#> 3  ID3highlightboo      2.7     42NA     NA    
#> 
#> Theme tibble - Very much like a tibble:
#> # Color data frame (class colorDF) 7 x 3:
#>   ID    String    Factor Number Integer Logical Pvalue
#>   <chr> <chr>     <chr>  <dbl>  <dbl>   <lgl>   <dbl> 
#> 1 ID1   foo       foo    12.10   12     TRUE    0.001 
#> 2 ID2   baz       baz    -3.14  -13     FALSE   0.314 
#> 3 ID3   highlight boo     2.72   42     NA         NA 
#> 
#> Theme dark - Suitable for white on black terminals:
#> # Color data frame (class colorDF) 7 x 3:
#>  │ID   │String   │Factor│Number│Integer│Logical│Pvalue
#> 1  ID1foo      foo     12.1     12TRUE   0.001 
#> 2  ID2baz      baz     -3.1    -13FALSE  0.314 
#> 3  ID3highlightboo      2.7     42NA     NA    
#> 
#> Theme bw - Black and white only. Suitable for black on white terminals:
#> # Color data frame (class colorDF) 7 x 3:
#>  │ID   │String   │Factor│Number│Integer│Logical│Pvalue
#> 1  ID1foo      foo   │  12.1│     12│TRUE   0.001 
#> 2  ID2baz      baz   │  -3.1│    -13│FALSE  0.314 
#> 3  ID3highlightboo   │   2.7│     42│NA     NA    
#> 
#> Theme wb - Black and white only. Suitable for white on black terminals:
#> # Color data frame (class colorDF) 7 x 3:
#>  │ID   │String   │Factor│Number│Integer│Logical│Pvalue
#> 1  ID1foo      foo   │  12.1│     12│TRUE   0.001 
#> 2  ID2baz      baz   │  -3.1│    -13│FALSE  0.314 
#> 3  ID3highlightboo   │   2.7│     42│NA     NA    
#> 
#> Theme new - My new theme:
#> # Color data frame (class colorDF) 7 x 3:
#>  │ID   │String   │Factor│Number│Integer│Logical│Pvalue
#> 1  ID1foo      foo   │  12.1│     12│TRUE   0.001 
#> 2  ID2baz      baz   │  -3.1│    -13│FALSE  0.314 
#> 3  ID3highlightboo   │   2.7│     42│NA     NA    
#> 
#> Default theme: dark
#> Change it with `options(colorDF_theme="<theme name>")`
colorDF_themes_show(themes=c("wb", "bw"))
#> Theme bw - Black and white only. Suitable for black on white terminals:
#> # Color data frame (class colorDF) 7 x 3:
#>  │ID   │String   │Factor│Number│Integer│Logical│Pvalue
#> 1  ID1foo      foo   │  12.1│     12│TRUE   0.001 
#> 2  ID2baz      baz   │  -3.1│    -13│FALSE  0.314 
#> 3  ID3highlightboo   │   2.7│     42│NA     NA    
#> 
#> Theme wb - Black and white only. Suitable for white on black terminals:
#> # Color data frame (class colorDF) 7 x 3:
#>  │ID   │String   │Factor│Number│Integer│Logical│Pvalue
#> 1  ID1foo      foo   │  12.1│     12│TRUE   0.001 
#> 2  ID2baz      baz   │  -3.1│    -13│FALSE  0.314 
#> 3  ID3highlightboo   │   2.7│     42│NA     NA    
#> 
#> Default theme: dark
#> Change it with `options(colorDF_theme="<theme name>")`