Skip to content

Commit

Permalink
Add 'pkgdown' theme for SVGs
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Jul 13, 2022
1 parent 068da0a commit 8c7f5b9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
3 changes: 2 additions & 1 deletion R/parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
#' a build-in theme, or a named list of theme properties,
#' see [default_theme()].
#' The built-in themes are `"asciinema"`, `"tango"`, `"solarized-dark"`,
#' `"solarized-light"`, `"seti"`, `"monokai"`, `"github-light"`.
#' `"solarized-light"`, `"seti"`, `"monokai"`, `"github-light"`,
#' `"pkgdown"`.
#'
#' @name asciicast-package
#' @family asciicast functions
Expand Down
24 changes: 24 additions & 0 deletions R/svg.R
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,31 @@ themes <- list(
cursor = c(grDevices::col2rgb("#657b83")),
bold = c(grDevices::col2rgb("#657b83")),
text = c(grDevices::col2rgb("#657b83"))
),

"pkgdown" = list(
black = c(grDevices::col2rgb("#073642")),
red = c(grDevices::col2rgb("#dc322f")),
green = c(grDevices::col2rgb("#859900")),
yellow = c(grDevices::col2rgb("#b58900")),
blue = c(grDevices::col2rgb("#268bd2")),
magenta = c(grDevices::col2rgb("#d33682")),
cyan = c(grDevices::col2rgb("#2aa198")),
white = c(grDevices::col2rgb("#eee8d5")),
light_black = c(grDevices::col2rgb("#002b36")),
light_red = c(grDevices::col2rgb("#cb4b16")),
light_green = c(grDevices::col2rgb("#586e75")),
light_yellow = c(grDevices::col2rgb("#657c83")),
light_blue = c(grDevices::col2rgb("#839496")),
light_magenta = c(grDevices::col2rgb("#6c71c4")),
light_cyan = c(grDevices::col2rgb("#93a1a1")),
light_white = c(grDevices::col2rgb("#fdf6e3")),
background = c(grDevices::col2rgb("#f1f3f5")),
cursor = c(grDevices::col2rgb("#172431")),
bold = c(grDevices::col2rgb("#172431")),
text = c(grDevices::col2rgb("#172431"))
)

)

#' Play asciinema cast as an SVG image in the default browser
Expand Down
3 changes: 2 additions & 1 deletion man/asciicast-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8c7f5b9

Please sign in to comment.