-
Notifications
You must be signed in to change notification settings - Fork 12
/
Helsinki.R
295 lines (247 loc) · 8.82 KB
/
Helsinki.R
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
## Helsinki.R | 2023 10 15
## Colors of the University of Helsinki, Finland
## ---------------------------------------------
# Information: ------
# cur_pals: "helsinki_1", "helsinki_2", "helsinki_3" (3)
# inst: "University of Helsinki"
# inst_alt: "Helsingin Yliopisto / UH"
# country: Finland
# inst_URL: <https://www.helsinki.fi> or <https://www.helsinki.fi/en>
# Color source: HTML: / PDF
# color_URL: <https://static.helsinki.fi/ds/tokens/color.html>
# Last check: 2023-10-14
# Colors: ------
# Color definitions:
# From <https://static.helsinki.fi/ds/tokens/color.html>
# Last check: 2023-10-14.
# Colors
# The main colors of Helsinki University style are white, black and shades of blue
# defined in the brand guide.
#
# Additional colors are used only as the accent color for different departments designs
# that the color is assigned to and should not be used in general components.
#
# Usage
#
# Color CSS variable Color code Comments
# --brand-main #0e688b Main brand color
# --brand-main-light #107eab
# --brand-main-active #005379
# --brand-main-dark #003146
# --brand-main-nearly-black #000222
#
# --grayscale-white #fff Main white
# --grayscale-light #f8f8f8
# --grayscale-medium-dark #979797
# --grayscale-dark #555555
# --grayscale-black #000000 Main black
#
# --additional-red-light #E5053A Color reserved for department use
# --additional-red-dark #A31621 Color reserved for department use
# --additional-purple-light #42003 Color reserved for department use
# --additional-yellow #F9A21A Color reserved for department use
# --additional-skyblue #48C5F8 Color reserved for department use
# --additional-green-light #96BA3C Color reserved for department use
# --additional-green-dark #006400 Color reserved for department use
# 1: Brand main colors ----
#
# "#0e688b" # brand main
# "#107eab" # .. light
# "#005379" # .. active
# "#003146" # .. dark
# "#000222" # .. nearly-black
he_cols_1 <- c("#0e688b", # brand main
"#107eab", # .. light
"#005379", # .. active
"#003146", # .. dark
"#000222" # .. nearly-black)
)
he_nams_1 <- paste("UH",
c("main",
"light",
"active",
"dark",
"nearly-black"
))
# 2: Grayscale colors ----
#
# "#ffffff" # white
# "#f8f8f8" # grayscale-light
# "#979797" # grayscale-medium-dark
# "#555555" # grayscale-dark
# "#000000" # black
he_cols_2 <- c("#ffffff", # white
"#f8f8f8", # grayscale-light
"#979797", # grayscale-medium-dark
"#555555", # grayscale-dark
"#000000" # black
)
he_nams_2 <- c("white",
"light",
"medium dark",
"dark",
"black"
)
# 3: Colors reserved for departmental use ----
#
# "#E5053A" # --additional-red-light
# "#A31621" # --additional-red-dark
# "#420030" # --additional-purple-light
# "#F9A21A" # --additional-yellow
# "#48C5F8" # --additional-skyblue
# "#96BA3C" # --additional-green-light
# "#006400" # --additional-green-dark
he_cols_3 <- c("#E5053A", # --additional-red-light
"#A31621", # --additional-red-dark
"#420030", # --additional-purple-light
"#F9A21A", # --additional-yellow
"#48C5F8", # --additional-skyblue
"#96BA3C", # --additional-green-light
"#006400" # --additional-green-dark
)
he_nams_3 <- paste("add",
c("red light",
"red dark",
"purple light",
"yellow",
"skyblue",
"green light",
"green dark"
))
# Color palette(s):
# - helsinki_1: Main brand colors of Helsinki ------
#' Main brand colors of the University of Helsinki, Finland
#'
#' \code{helsinki_1} provides the brand main colors
#' of the \href{https://www.helsinki.fi}{University of Helsinki}, Finland.
#'
#' To be used in combination with the grayscale colors of \code{\link{helsinki_2}}.
#'
#' The main colors of Helsinki University style are white, black,
#' and shades of blue defined in the brand guide.
#'
#' \code{helsinki_1} is based on HEX color definitions.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-10-15.
#'
#' @source
#' Color definitions are based on
#' the \href{https://www.helsinki.fi}{UH}'s
#' \href{https://static.helsinki.fi/ds/tokens/color.html}{brand guide} (HTML).
#'
#' @examples
#' helsinki_1
#' unikn::seecol(helsinki_1,
#' main = "Brand main colors of the University of Helsinki, Finland") # view palette
#'
#' @family Finnish university color palettes
#'
#' @seealso
#' \code{\link{helsinki_2}} for grayscale colors of the University of Helsinki;
#' \code{\link{helsinki_3}} for departmental colors of the University of Helsinki;
#' \code{\link{seecol}} for viewing and comparing color palettes;
#' \code{\link{usecol}} for using color palettes;
#' \code{\link{simcol}} for finding similar colors;
#' \code{\link{newpal}} for defining new color palettes;
#' \code{\link{grepal}} for finding named colors.
#'
#' @export
helsinki_1 <- unikn::newpal(col = he_cols_1,
names = he_nams_1,
as_df = FALSE)
# # Check:
# unikn::seecol(helsinki_1, main = "Main brand colours of Helsinki University, Finland", col_bg = "grey90")
# - helsinki_2: Grayscale colors of Helsinki ------
#' Grayscale colors of the University of Helsinki, Finland
#'
#' \code{helsinki_2} provides the grayscale colors
#' of the \href{https://www.helsinki.fi}{University of Helsinki}, Finland.
#'
#' To be used in combination with the main brand colors of \code{\link{helsinki_1}}.
#'
#' \code{helsinki_2} is based on HEX color definitions.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-10-15.
#'
#' @source
#' Color definitions are based on
#' the \href{https://www.helsinki.fi}{UH}'s
#' \href{https://static.helsinki.fi/ds/tokens/color.html}{brand guide} (HTML).
#'
#' @examples
#' helsinki_2
#' unikn::seecol(helsinki_2, col_bg = "grey90",
#' main = "Grayscale colors of the University of Helsinki, Finland") # view palette
#'
#' @family Finnish university color palettes
#'
#' @seealso
#' \code{\link{helsinki_1}} for main brand colors of the University of Helsinki;
#' \code{\link{helsinki_3}} for departmental colors of the University of Helsinki;
#' \code{\link{seecol}} for viewing and comparing color palettes;
#' \code{\link{usecol}} for using color palettes;
#' \code{\link{simcol}} for finding similar colors;
#' \code{\link{newpal}} for defining new color palettes;
#' \code{\link{grepal}} for finding named colors.
#'
#' @export
helsinki_2 <- unikn::newpal(col = he_cols_2,
names = he_nams_2,
as_df = FALSE)
# # Check:
# unikn::seecol(helsinki_2, main = "Grayscale colours of Helsinki University, Finland", col_bg = "grey90")
# - helsinki_3: Departmental colors of Helsinki ------
#' Departmental accent colors of the University of Helsinki, Finland
#'
#' \code{helsinki_3} provides the departmental accent colors
#' of the \href{https://www.helsinki.fi}{University of Helsinki}, Finland.
#'
#' Additional colors are used only as an accent color for different department's designs
#' and should not be used in general components.
#'
#' \code{helsinki_3} is based on HEX color definitions.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-10-15.
#'
#' @source
#' Color definitions are based on
#' the \href{https://www.helsinki.fi}{UH}'s
#' \href{https://static.helsinki.fi/ds/tokens/color.html}{brand guide} (HTML).
#'
#' @examples
#' helsinki_3
#' unikn::seecol(helsinki_3,
#' main = "Departmental accent colors of the University of Helsinki, Finland")
#'
#' @family Finnish university color palettes
#'
#' @seealso
#' \code{\link{helsinki_1}} for main brand colors of the University of Helsinki;
#' \code{\link{helsinki_2}} for grayscale colors of the University of Helsinki;
#' \code{\link{seecol}} for viewing and comparing color palettes;
#' \code{\link{usecol}} for using color palettes;
#' \code{\link{simcol}} for finding similar colors;
#' \code{\link{newpal}} for defining new color palettes;
#' \code{\link{grepal}} for finding named colors.
#'
#' @export
helsinki_3 <- unikn::newpal(col = he_cols_3,
names = he_nams_3,
as_df = FALSE)
# # Check:
# unikn::seecol(helsinki_3, main = "Departmental colours of Helsinki University, Finland", col_bg = "grey90")
## ToDo: -----
# - etc. ----
## eof. ----