😎 Give your xaringan slides some style
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

26 Zeilen
873B

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/color.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. }