checkLightMode function

check lightMode for light background color

check lightMode for light background color

checkLightMode(lightMode = NULL, ...)

Arguments

  • lightMode: logical or NULL, indicating whether the lightMode parameter has been defined in the function call.
  • ...: Additional arguments are ignored.

Returns

logical or length=1, indicating whether lightMode is defined

Details

Check the lightMode status through function parameter, options, or environment variable. If the function defines lightMode, it is used as-is. If lightMode is NULL, then options("jam.lightMode") is used if defined. Otherwise, it tries to detect whether the R session is running inside Rstudio using the environmental variable "RSTUDIO", and if so it assumes lightMode==TRUE.

To set a default lightMode, add options("jam.lightMode"=TRUE) to .Rprofile, or to the relevant R script.

Examples

checkLightMode(TRUE); checkLightMode();

See Also

Other jam practical functions: breakDensity(), call_fn_ellipsis(), check_pkg_installed(), colNum2excelName(), color_dither(), exp2signed(), getAxisLabel(), isFALSEV(), isTRUEV(), jargs(), kable_coloring(), lldf(), log2signed(), middle(), minorLogTicks(), newestFile(), printDebug(), reload_rmarkdown_cache(), renameColumn(), rmInfinite(), rmNA(), rmNAs(), rmNULL(), setPrompt()

  • Maintainer: James M. Ward
  • License: MIT + file LICENSE
  • Last published: 2025-03-23