😎 Give your xaringan slides some style
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
7.6KB

  1. #' @param primary_color Duotone Primary Color, defaults to #006747
  2. #' @param secondary_color Duotone Secondary Color, defaults to #CFC493
  3. #' @param white_color Brightest color used, defaults to #FFFFFF
  4. #' @param black_color Darkest color used, defaults to #000000
  5. #' @param text_color Text Color, defaults to `white_color`
  6. #' @param header_color Header Color, defaults to `primary_color`
  7. #' @param background_color Slide Background Color, defaults to `black_color`
  8. #' @param link_color Link Color, defaults to `choose_dark_or_light(secondary_color, secondary_color, primary_color)`
  9. #' @param text_bold_color Bold Text Color, defaults to `choose_dark_or_light(secondary_color, secondary_color, primary_color)`
  10. #' @param text_slide_number_color Slide Number Color, defaults to `primary_color`
  11. #' @param code_highlight_color Code Line Highlight, defaults to rgba(255,255,0,0.5)
  12. #' @param code_inline_color Inline Code Color, defaults to `choose_dark_or_light(secondary_color, secondary_color, primary_color)`
  13. #' @param code_inline_background_color Inline Code Background Color, defaults to NA
  14. #' @param code_inline_font_size Inline Code Text Font Size, defaults to 1em
  15. #' @param inverse_background_color Inverse Background Color, defaults to `secondary_color`
  16. #' @param inverse_text_color Inverse Text Color, defaults to `choose_dark_or_light(secondary_color, black_color, white_color)`
  17. #' @param inverse_text_shadow Enables Shadow on text of inverse slides, defaults to `FALSE`
  18. #' @param inverse_header_color Inverse Header Color, defaults to `choose_dark_or_light(secondary_color, black_color, white_color)`
  19. #' @param title_slide_text_color Title Slide Text Color, defaults to `choose_dark_or_light(primary_color, black_color, white_color)`
  20. #' @param title_slide_background_color Title Slide Background Color, defaults to `primary_color`
  21. #' @param title_slide_background_image Title Slide Background Image URL, defaults to NA
  22. #' @param title_slide_background_size Title Slide Background Image Size, defaults to "cover" if background image is set, defaults to NA
  23. #' @param title_slide_background_position Title Slide Background Image Position, defaults to NA
  24. #' @param footnote_color Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}`), defaults to NA
  25. #' @param footnote_font_size Footnote font size, defaults to 90%
  26. #' @param footnote_position_bottom Footnote location from bottom of screen, defaults to 3em
  27. #' @param left_column_subtle_color Left Column Text (not last), defaults to `apply_alpha(primary_color, 0.6)`
  28. #' @param left_column_selected_color Left Column Current Selection, defaults to `primary_color`
  29. #' @param blockquote_left_color Blockquote Left Border Color, defaults to `apply_alpha(secondary_color, 0.5)`
  30. #' @param table_border_color Table top/bottom border, defaults to #666
  31. #' @param table_row_border_color Table row inner bottom border, defaults to #ddd
  32. #' @param table_row_even_background_color Table Even Row Background Color, defaults to `darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.3)`
  33. #' @param text_font_size Slide Body Text Font Size, defaults to 20px
  34. #' @param header_h1_font_size h1 Header Text Font Size, defaults to 55px
  35. #' @param header_h2_font_size h2 Header Text Font Size, defaults to 45px
  36. #' @param header_h3_font_size h3 Header Text Font Size, defaults to 35px
  37. #' @param text_slide_number_font_size Slide Number Text Font Size, defaults to 0.9em
  38. #' @param text_font_google Use `google_font()` to specify body font, defaults to `NULL`
  39. #' @param text_font_family Body Text Font Family, defaults to 'Droid Serif'
  40. #' @param text_font_weight Body Text Font Weight, defaults to normal
  41. #' @param text_font_url Body Text Font URL(s), defaults to https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic
  42. #' @param text_font_family_fallback Body Text Font Fallbacks, defaults to 'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC'
  43. #' @param text_font_base Body Text Base Font (Total Failure Fallback), defaults to serif
  44. #' @param header_font_google Use `google_font()` to specify header font, defaults to `NULL`
  45. #' @param header_font_family Header Font Family, defaults to 'Yanone Kaffeesatz'
  46. #' @param header_font_weight Header Font Weight, defaults to normal
  47. #' @param header_font_url Header Font URL, defaults to https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz
  48. #' @param code_font_google Use `google_font()` to specify code font, defaults to `NULL`
  49. #' @param code_font_family Code Font Family, defaults to 'Source Code Pro'
  50. #' @param code_font_size Code Text Font Size, defaults to 0.9em
  51. #' @param code_font_url Code Font URL, defaults to https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700
  52. #' @param code_font_family_fallback Code Font Fallback, defaults to 'Lucida Console', Monaco
  53. #' @template extra_css
  54. #' @param outfile Customized xaringan CSS output file name, default is "xaringan-themer.css"
  55. #' @template duo_accent_inverse
  56. #' @family Duotone themes
  57. #' @export
  58. duo_accent_inverse <- function(
  59. primary_color = "#006747",
  60. secondary_color = "#CFC493",
  61. white_color = "#FFFFFF",
  62. black_color = "#000000",
  63. text_color = white_color,
  64. header_color = primary_color,
  65. background_color = black_color,
  66. link_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  67. text_bold_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  68. text_slide_number_color = primary_color,
  69. code_highlight_color = "rgba(255,255,0,0.5)",
  70. code_inline_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  71. code_inline_background_color = NA,
  72. code_inline_font_size = "1em",
  73. inverse_background_color = secondary_color,
  74. inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color),
  75. inverse_text_shadow = FALSE,
  76. inverse_header_color = choose_dark_or_light(secondary_color, black_color, white_color),
  77. title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color),
  78. title_slide_background_color = primary_color,
  79. title_slide_background_image = NA,
  80. title_slide_background_size = NA,
  81. title_slide_background_position = NA,
  82. footnote_color = NA,
  83. footnote_font_size = "90%",
  84. footnote_position_bottom = "3em",
  85. left_column_subtle_color = apply_alpha(primary_color, 0.6),
  86. left_column_selected_color = primary_color,
  87. blockquote_left_color = apply_alpha(secondary_color, 0.5),
  88. table_border_color = "#666",
  89. table_row_border_color = "#ddd",
  90. table_row_even_background_color = darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.3),
  91. text_font_size = "20px",
  92. header_h1_font_size = "55px",
  93. header_h2_font_size = "45px",
  94. header_h3_font_size = "35px",
  95. text_slide_number_font_size = "0.9em",
  96. text_font_google = NULL,
  97. text_font_family = "'Droid Serif'",
  98. text_font_weight = "normal",
  99. text_font_url = "https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic",
  100. text_font_family_fallback = "'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC'",
  101. text_font_base = "serif",
  102. header_font_google = NULL,
  103. header_font_family = "'Yanone Kaffeesatz'",
  104. header_font_weight = "normal",
  105. header_font_url = "https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz",
  106. code_font_google = NULL,
  107. code_font_family = "'Source Code Pro'",
  108. code_font_size = "0.9em",
  109. code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
  110. code_font_family_fallback = "'Lucida Console', Monaco",
  111. extra_css = NULL,
  112. extra_fonts = NULL,
  113. outfile = "xaringan-themer.css"
  114. ) {
  115. # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
  116. eval(parse(text = call_write_xaringan_theme()))
  117. }