😎 Give your xaringan slides some style
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

26 linhas
873B

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/utils.R
  3. \name{choose_dark_or_light}
  4. \alias{choose_dark_or_light}
  5. \title{Choose dark or light color}
  6. \usage{
  7. choose_dark_or_light(x, black = "#000000", white = "#FFFFFF")
  8. }
  9. \arguments{
  10. \item{x}{The background color (hex)}
  11. \item{black}{Text or foreground color, e.g. "#222" or
  12. \code{substitute(darken_color(x, 0.8))}, if black text provides the best contrast.}
  13. \item{white}{Text or foreground color or expression, e.g. "#EEE" or
  14. \code{substitute(lighten_color(x, 0.8))}, if white text provides the best contrast.}
  15. }
  16. \description{
  17. Takes a color input as \code{x} and returns either the black or white color (or
  18. expression) if dark or light text should be used over the input color for
  19. best contrast. Follows W3C Recommendations.
  20. }
  21. \references{
  22. \url{https://stackoverflow.com/a/3943023/2022615}
  23. }