blob: 6693c96e0bc09c41258a5e3e5892c3cd606334b8 [file] [log] [blame]
Marc Kupietz52144812020-12-14 23:41:56 +01001idsBaseFontFamily <- 'Fira Sans Condensed'
2
Marc Kupietz161a86a2021-02-02 14:40:23 +01003
4#' Title
5#'
6#' @return
7#' @export
8#'
9#' @examples
10idsPalette <- function() {
11 c(
Marc Kupietza371c672020-12-18 15:56:15 +010012 '#F18700',
13 "#1E2662",
14 "#6A7702",
15 "#C10A25",
16 "#009EE3",
17 "#FAF3DE",
18 "#A7C2D2",
19 "#E2E8A4",
20 "#CFBCBD",
21 "#BCE3FA",
22 "#5C401C",
23 "#000000",
24 "#354C32",
25 "#5C131C",
26 "#273582",
27 "#FFE3BF",
28 "#8994E1",
29 "#A3B29E",
30 "#DF9599",
31 "#79B8DB"
32)
Marc Kupietz161a86a2021-02-02 14:40:23 +010033}
Marc Kupietza371c672020-12-18 15:56:15 +010034
Marc Kupietz161a86a2021-02-02 14:40:23 +010035#' Title
36#'
37#' @return
38#' @export
39#'
40#' @examples
41idsPaletteD3 <- function() {
42 c(
Marc Kupietz52144812020-12-14 23:41:56 +010043 '#EB7C31',
44 "#1F77B4",
45 "#2CA02C",
46 "#D62728",
47 "#9467BD",
48 "#8C564B",
49 "#E377C2",
50 "#7F7F7F",
51 "#BCBD22",
52 "#17BECF",
53 "#AEC7E8",
54 "#FFBB78",
55 "#98DF8A",
56 "#FF9896",
57 "#C5B0D5",
58 "#C49C94",
59 "#F7B6D2",
60 "#C7C7C7",
61 "#DBDB8D",
62 "#9EDAE5"
63)
Marc Kupietz161a86a2021-02-02 14:40:23 +010064}
Marc Kupietz52144812020-12-14 23:41:56 +010065
Marc Kupietz161a86a2021-02-02 14:40:23 +010066#' Title
67#'
68#' @return
69#' @export
70#'
71#' @examples
72idsPaletteGreyscale <- function() {
73 c(
Marc Kupietz52144812020-12-14 23:41:56 +010074 "#000000", "#B2B0AD", "#737373", "#D8D7D6", "#B2B0AD", "#8C8984"
Marc Kupietz161a86a2021-02-02 14:40:23 +010075 )
76}
Marc Kupietz52144812020-12-14 23:41:56 +010077
78backgroundColorDark <- "#2a2a2a"
79textColorDark <- "#E0E0E3"
80lowContrastColorDark <- "#707073"
81highContrastColorDark <- "#F0F0F3"
82mediumContrastColorDark <- "#808083"
83
84backgroundColor <- "#ffffff"
85textColor <- "#383838"
86highContrastColor <- "#101013"
87lowContrastColor <- "#E0E0E3"
88mediumContrastColor <- "#404043"
89tooltipBackgroundColor <- "#ffffffe0"
90boxplotFillColor <- "#505053"
91candlestickColor <- "black"
92errorbarColor <- "black"
93
Marc Kupietza371c672020-12-18 15:56:15 +010094#' IDS color palette
95#'
96#' @param palette \code{c("D3", "default")} - use default or (adapted) d3 palette
Marc Kupietz52144812020-12-14 23:41:56 +010097#'
98#' @importFrom scales manual_pal
99#' @export
100#'
101#' @references
102#'
103#' \url{https://github.com/d3/d3}
104#'
Marc Kupietza371c672020-12-18 15:56:15 +0100105ids_pal <- function(palette="default") {
Marc Kupietz161a86a2021-02-02 14:40:23 +0100106 values <- if(palette == "d3" || palette == "D3") idsPaletteD3() else idsPalette()
Marc Kupietz52144812020-12-14 23:41:56 +0100107 f <- scales::manual_pal(values)
108 attr(f, "max_n") <- length(values)
109 f
110}