blob: bfab33ab59bdd3fa16c48f06e58370528d7e730f [file] [log] [blame]
Marc Kupietz52144812020-12-14 23:41:56 +01001idsBaseFontFamily <- 'Fira Sans Condensed'
2
3idsPalette <- c(
Marc Kupietza371c672020-12-18 15:56:15 +01004 '#F18700',
5 "#1E2662",
6 "#6A7702",
7 "#C10A25",
8 "#009EE3",
9 "#FAF3DE",
10 "#A7C2D2",
11 "#E2E8A4",
12 "#CFBCBD",
13 "#BCE3FA",
14 "#5C401C",
15 "#000000",
16 "#354C32",
17 "#5C131C",
18 "#273582",
19 "#FFE3BF",
20 "#8994E1",
21 "#A3B29E",
22 "#DF9599",
23 "#79B8DB"
24)
25
26idsPaletteD3 <- c(
Marc Kupietz52144812020-12-14 23:41:56 +010027 '#EB7C31',
28 "#1F77B4",
29 "#2CA02C",
30 "#D62728",
31 "#9467BD",
32 "#8C564B",
33 "#E377C2",
34 "#7F7F7F",
35 "#BCBD22",
36 "#17BECF",
37 "#AEC7E8",
38 "#FFBB78",
39 "#98DF8A",
40 "#FF9896",
41 "#C5B0D5",
42 "#C49C94",
43 "#F7B6D2",
44 "#C7C7C7",
45 "#DBDB8D",
46 "#9EDAE5"
47)
48
49idsPaletteGreyscale <- c(
50 "#000000", "#B2B0AD", "#737373", "#D8D7D6", "#B2B0AD", "#8C8984"
51)
52
53backgroundColorDark <- "#2a2a2a"
54textColorDark <- "#E0E0E3"
55lowContrastColorDark <- "#707073"
56highContrastColorDark <- "#F0F0F3"
57mediumContrastColorDark <- "#808083"
58
59backgroundColor <- "#ffffff"
60textColor <- "#383838"
61highContrastColor <- "#101013"
62lowContrastColor <- "#E0E0E3"
63mediumContrastColor <- "#404043"
64tooltipBackgroundColor <- "#ffffffe0"
65boxplotFillColor <- "#505053"
66candlestickColor <- "black"
67errorbarColor <- "black"
68
Marc Kupietza371c672020-12-18 15:56:15 +010069#' IDS color palette
70#'
71#' @param palette \code{c("D3", "default")} - use default or (adapted) d3 palette
Marc Kupietz52144812020-12-14 23:41:56 +010072#'
73#' @importFrom scales manual_pal
74#' @export
75#'
76#' @references
77#'
78#' \url{https://github.com/d3/d3}
79#'
Marc Kupietza371c672020-12-18 15:56:15 +010080ids_pal <- function(palette="default") {
81 values <- if(palette == "d3" || palette == "D3") idsPaletteD3 else idsPalette
Marc Kupietz52144812020-12-14 23:41:56 +010082 f <- scales::manual_pal(values)
83 attr(f, "max_n") <- length(values)
84 f
85}