-
Notifications
You must be signed in to change notification settings - Fork 12
/
UCLA.R
272 lines (237 loc) · 9.65 KB
/
UCLA.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
## UCLA.R | 2023 09 24
## Colors of UCLA, University of California, USA
## ---------------------------------------------
# Information: ------
# cur_pals: "ucla_1", "ucla_2", "ucla_3" "ucla_4" (4)
# inst: "University of California, Los Angeles"
# alt: "UCLA / UC Los Angeles"
# country: USA
# URL: "https://www.ucla.edu"
# Color source:
# URL: <https://brand.ucla.edu/identity/colors>
# Last check: 2023-06-16
# Colors: ------
# Colors are defined in color palettes (below).
# Color palette(s):
# - ucla_1: Primary colors of UCLA ------
#' Primary colors of UCLA, University of California, Los Angeles, USA
#'
#' \code{ucla_1} provides three primary colors.
#' of the \href{https://www.ucla.edu}{University of California, Los Angeles (UCLA)}, USA.
#'
#' The 3 primary colors are
#' \code{"UCLA blue"} (defined as CMYK 83/40/3/6, RGB 39/116/174, HEX #2774AE),
#' \code{"UCLA gold"} (defined as CMYK 0/9/100/0, RGB 255/209/0, HEX #FFD100), and
#' \code{"white"} (defined as CMYK 0/0/0/0, RGB 255/255/255, HEX #FFFFFF).
#'
#' \code{ucla_1} uses the HEX color definitions.
#'
#' @details
#' Over the years the \code{"UCLA blue"} color has always been more important than \code{"UCLA gold"}
#' A field of \code{"UCLA blue"} with a \code{"UCLA gold"} accent says "UCLA".
#' A field of \code{"UCLA gold"} with a \code{"UCLA blue"} accent does not.
#'
#' Lavish use of \code{"white"} in layouts enhances the brilliance of the colors.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-06-16.
#'
#' @source
#' Color definitions are based on \href{https://www.ucla.edu}{UCLA}'s
#' \href{https://brand.ucla.edu/identity/colors}{Color manual}.
#'
#' @examples
#' ucla_1
#' unikn::seecol(ucla_1, col_bg = "grey85",
#' main = "The primary colors of UCLA") # view color palette
#'
#' @family U.S. university color palettes
#'
#' @seealso
#' \code{\link{ucla_2}} for secondary colors of UCLA,;
#' \code{\link{ucla_3}} for tertiary colors of UCLA,;
#' \code{\link{ucla_4}} for blue gradient colors of UCLA,;
#' \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
ucla_1 <- unikn::newpal(col = c("#2774AE", "#FFD100", "#FFFFFF"),
names = c("UCLA blue", "UCLA gold", "white"),
as_df = FALSE)
# # Check:
# unikn::seecol(ucla_1, main = "The primary colors of UCLA", col_bg = "lightgrey")
# - ucla_2: Secondary colors of UCLA ------
#' Secondary colors of UCLA, University of California, Los Angeles, USA
#'
#' \code{ucla_2} provides six secondary colors
#' of the \href{https://www.ucla.edu}{University of California, Los Angeles (UCLA)}, USA.
#'
#' Secondary colors are
#' \code{"darkest blue"} (defined as CMYK 100/48/12/58, RGB 0/59/92, HEX #003B5C),
#' \code{"darker blue"} (defined as CMYK 100/45/0/45, RGB 0/85/135, HEX #005587),
#' \code{"lighter blue"} (defined as CMYK 45/14/9/9, RGB 139/184/232, HEX #8BB8E8),
#' \code{"lightest blue"} (defined as CMYK 20/6/0/0, RGB 218/235/254, HEX #DAEBFE),
#' \code{"darkest gold"} (defined as CMYK 0/31/98/0, RGB 255/184/28, HEX #FFB81C), and
#' \code{"darker gold"} (defined as CMYK 0/19/89/0, RGB 255/199/44, HEX #FFC72C).
#'
#' \code{ucla_2} uses the HEX color definitions.
#'
#' @details
#' A secondary palette has been developed to respect and complement the tradition of blue and gold,
#' while adding an additional level of brightness or darkness to the palette.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-06-16.
#'
#' @source
#' Color definitions are based on \href{https://www.ucla.edu}{UCLA}'s
#' \href{https://brand.ucla.edu/identity/colors}{Color manual}.
#'
#' @examples
#' ucla_2
#' unikn::seecol(ucla_2, main = "The secondary colors of UCLA") # view color palette
#'
#' @family U.S. university color palettes
#'
#' @seealso
#' \code{\link{ucla_1}} for primary colors of UCLA,;
#' \code{\link{ucla_3}} for tertiary colors of UCLA,;
#' \code{\link{ucla_4}} for blue gradient colors of UCLA,;
#' \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
ucla_2 <- unikn::newpal(col = c("#003B5C", "#005587", "#8BB8E8", "#DAEBFE",
"#FFB81C", "#FFC72C"),
names = c("darkest blue", "darker blue", "lighter blue", "lightest blue",
"darkest gold", "darker gold"),
as_df = FALSE)
# # Check:
# unikn::seecol(ucla_2, main = "Secondary colors of UCLA", col_bg = "lightgrey")
# - ucla_3: Tertiary colors of UCLA ------
#' Tertiary colors of UCLA, University of California, Los Angeles, USA
#'
#' \code{ucla_3} provides six tertiary brand colors
#' of the \href{https://www.ucla.edu}{University of California, Los Angeles (UCLA)}, USA.
#'
#' The 6 tertiary colors have different definitions for print and screen uses.
#' See \href{https://www.ucla.edu}{UCLA}'s
#' \href{https://brand.ucla.edu/identity/colors}{Color manual} for definitions and details.
#'
#' \code{ucla_3} uses the HEX color definitions.
#'
#' @details
#' A tertiary palette has been developed for use as an accent to the
#' primary and secondary colors (of \code{\link{ucla_1}} and \code{\link{ucla_2}}).
#'
#' Please note that in order to maintain maximum vibrancy of these colors,
#' they will appear slightly different between screen and print.
#' Due to printing limitations, the CMYK values are slightly duller than ideal.
#'
#' If your budget allows, select one tertiary color from the palette to include
#' in your project and print it as a spot to bring the vibrancy fully to life in print.
#' For the sake of accessibility, restrict use of tertiary colors to graphics only.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-06-16.
#'
#' @source
#' Color definitions are based on \href{https://www.ucla.edu}{UCLA}'s
#' \href{https://brand.ucla.edu/identity/colors}{Color manual}.
#'
#' @examples
#' ucla_3
#' unikn::seecol(ucla_3, main = "The tertiary colors of UCLA") # view color palette
#'
#' @family U.S. university color palettes
#'
#' @seealso
#' \code{\link{ucla_1}} for primary colors of UCLA,;
#' \code{\link{ucla_2}} for secondary colors of UCLA,;
#' \code{\link{ucla_4}} for blue gradient colors of UCLA,;
#' \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
ucla_3 <- unikn::newpal(col = c("#FFFF00", "#00FF87", "#FF00A5", "#00FFFF", "#8237FF", "#000000"),
names = c("yellow", "green", "magenta", "cyan", "purple", "black"),
as_df = FALSE)
# # Check:
# unikn::seecol(ucla_3, main = "Tertiary colors UCLA, University of California", col_bg = "white")
# - ucla_4: Blue brand gradient colors of UCLA -----
#' Blue brand gradient colors of UCLA, University of California, Los Angeles, USA
#'
#' \code{ucla_4} provides three blue brand gradient colors
#' of the \href{https://www.ucla.edu}{University of California, Los Angeles (UCLA)}, USA.
#'
#' The 3 gradient colors are
#' \code{darker blue}, defined as CMYK 100 45 0 45, RGB 0 85 135, or HEX #005587,
#' \code{UCLA blue}, defined as CMYK 83 40 3 6, RGB 39 116 174, or HEX #2774AE, and
#' \code{lighter blue}, defined as CMYK 45 14 0 0, RGB 139 184 232, or HEX #8BB8E8.
#'
#' \code{ucla_4} uses the HEX color definitions.
#'
#' @details
#' A blue gradient can be used to enliven fields of color.
#'
#' If the gradient is used strictly as a background -- for instance, under an overlay box --
#' you can use the complete color range.
#'
#' If you are overprinting the gradient with type, you need to make sure the resulting
#' contrast ratio meets accessibility standards.
#' See the color combination chart at \url{https://brand.ucla.edu/identity/colors#accessibility}.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-06-16.
#'
#' @source
#' Color definitions are based on \href{https://www.ucla.edu}{UCLA}'s
#' \href{https://brand.ucla.edu/identity/colors}{Color manual}.
#'
#' @examples
#' ucla_4
#' unikn::seecol(ucla_4, main = "The blue gradient colors of UCLA") # view color palette
#'
#' # Gradient with n = 7 tints:
#' unikn::seecol(unikn::usecol(ucla_4, n = 7), main = "UCLA blue brand gradient")
#'
#' @family U.S. university color palettes
#'
#' @seealso
#' \code{\link{ucla_1}} for primary colors of UCLA,;
#' \code{\link{ucla_2}} for secondary colors of UCLA,;
#' \code{\link{ucla_3}} for tertiary colors of UCLA,;
#' \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
ucla_4 <- unikn::newpal(col = c("#005587", "#2774AE", "#8BB8E8"),
names = c("darker blue", "UCLA blue", "lighter blue"),
as_df = FALSE)
# # Check:
# unikn::seecol(unikn::usecol(ucla_4, n = 7), main = "Blue brand gradient of UCLA")
## eof. ----------