File: colors.R

package info (click to toggle)
r-cran-bslib 0.9.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,412 kB
  • sloc: javascript: 13,349; makefile: 33; sh: 23
file content (36 lines) | stat: -rw-r--r-- 555 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
theme_colors <- list(
  "primary",
  "secondary",
  "success",
  "danger",
  "warning",
  "info",
  "light",
  "dark"
)

named_colors <- c(
  "blue",
  "indigo",
  "purple",
  "pink",
  "red",
  "orange",
  "yellow",
  "green",
  "teal",
  "cyan"
)

gc <- expand.grid(named_colors, named_colors)
gc <- gc[gc$Var1 != gc$Var2, ]
gradient_classes <- sprintf("bg-gradient-%s-%s", gc$Var1, gc$Var2)

all_themes <- c(
  "Default" = "",
  theme_colors,
  named_colors,
  paste0("text-", theme_colors),
  paste0("text-", named_colors),
  sort(gradient_classes)
)