Marc Kupietz | 5214481 | 2020-12-14 23:41:56 +0100 | [diff] [blame] | 1 | idsBaseFontFamily <- 'Fira Sans Condensed' |
| 2 | |
| 3 | idsPalette <- c( |
Marc Kupietz | a371c67 | 2020-12-18 15:56:15 +0100 | [diff] [blame^] | 4 | '#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 | |
| 26 | idsPaletteD3 <- c( |
Marc Kupietz | 5214481 | 2020-12-14 23:41:56 +0100 | [diff] [blame] | 27 | '#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 | |
| 49 | idsPaletteGreyscale <- c( |
| 50 | "#000000", "#B2B0AD", "#737373", "#D8D7D6", "#B2B0AD", "#8C8984" |
| 51 | ) |
| 52 | |
| 53 | backgroundColorDark <- "#2a2a2a" |
| 54 | textColorDark <- "#E0E0E3" |
| 55 | lowContrastColorDark <- "#707073" |
| 56 | highContrastColorDark <- "#F0F0F3" |
| 57 | mediumContrastColorDark <- "#808083" |
| 58 | |
| 59 | backgroundColor <- "#ffffff" |
| 60 | textColor <- "#383838" |
| 61 | highContrastColor <- "#101013" |
| 62 | lowContrastColor <- "#E0E0E3" |
| 63 | mediumContrastColor <- "#404043" |
| 64 | tooltipBackgroundColor <- "#ffffffe0" |
| 65 | boxplotFillColor <- "#505053" |
| 66 | candlestickColor <- "black" |
| 67 | errorbarColor <- "black" |
| 68 | |
Marc Kupietz | a371c67 | 2020-12-18 15:56:15 +0100 | [diff] [blame^] | 69 | #' IDS color palette |
| 70 | #' |
| 71 | #' @param palette \code{c("D3", "default")} - use default or (adapted) d3 palette |
Marc Kupietz | 5214481 | 2020-12-14 23:41:56 +0100 | [diff] [blame] | 72 | #' |
| 73 | #' @importFrom scales manual_pal |
| 74 | #' @export |
| 75 | #' |
| 76 | #' @references |
| 77 | #' |
| 78 | #' \url{https://github.com/d3/d3} |
| 79 | #' |
Marc Kupietz | a371c67 | 2020-12-18 15:56:15 +0100 | [diff] [blame^] | 80 | ids_pal <- function(palette="default") { |
| 81 | values <- if(palette == "d3" || palette == "D3") idsPaletteD3 else idsPalette |
Marc Kupietz | 5214481 | 2020-12-14 23:41:56 +0100 | [diff] [blame] | 82 | f <- scales::manual_pal(values) |
| 83 | attr(f, "max_n") <- length(values) |
| 84 | f |
| 85 | } |