-
Notifications
You must be signed in to change notification settings - Fork 12
/
York.R
127 lines (108 loc) · 4.07 KB
/
York.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
## York University.R | 2023 09 23
## Colors of York University, Canada
## ---------------------------------
# Information: ------
# cur_pals: "yorku_1","yorku_2" (1)
# inst: "York University" (in English)
# inst_alt: "York University"
# country: Canada
# URL: "https://www.yorku.ca"
# Color source:
# URL: <https://www.yorku.ca/brand/>
# Last check: 2023-06-24
# Colors: ------
# Color palette(s):
# - yorku_1: Primary colors of York University ------
#' Primary colors of the York University, Canada
#'
#' \code{yorku_1} provides the three primary colors
#' of the \href{https://www.yorku.ca}{York University}, Canada.
#'
#' The 3 primary colors are
#' \code{"York red"} (defined as RGB 227/24/55, HEX #E31837),
#' \code{"white"} (defined as RGB 255/255/255, HEX #FFFFFF), and
#' \code{"black"} (defined as RGB 0/0/0, HEX #000000).
#'
#' \code{yorku_1} uses the HEX color definitions.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-06-24.
#'
#' @source
#' Color definitions are based on \href{https://www.yorku.ca}{York}'s
#' \href{https://www.yorku.ca/brand/}{Brand standards} (PDF).
#'
#' @examples
#' yorku_1
#' unikn::seecol(yorku_1, col_bg = "grey90",
#' main = "The primary colors of York University, CA") # view palette
#'
#' @family Canadian university color palettes
#'
#' @seealso
#' \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
yorku_1 <- unikn::newpal(col = c("#E31837", "#FFFFFF", "#000000"),
names = c("York red", "white", "black"),
as_df = FALSE)
# - yorku_2: Secondary colors of York University ------
#' Secondary colors of the York University, Canada
#'
#' \code{yorku_2} provides eight secondary colors
#' of the \href{https://www.yorku.ca}{York University}, Canada.
#'
#' The 8 secondary colors are:
#' \code{"York red medium"} (defined as RGB 175/13/26, HEX #AF0D1A),
#' \code{"York red dark"} (defined as RGB 129/0/1, HEX #810001),
#' \code{"York bright blue"} (defined as RGB 58/194/239, HEX #3AC2EF),
#' \code{"York light blue"} (defined as RGB 172/230/248, HEX #ACE6F8),
#' \code{"York light grey"} (defined as RGB 225/223/220, HEX #E1DFDC),
#' \code{"York pewter"} (defined as RGB 214/207/202, HEX #D6CFCA),
#' \code{"York grey medium"} (defined as RGB 183/174/169, HEX #B7AEA9), and
#' \code{"York grey dark"} (defined as RGB 104/98/96, HEX #686260).
#'
#' \code{yorku_2} uses the HEX color definitions.
#'
#' @return
#' A named vector of colors (HEX/HTML codes of type character).
#'
#' @author
#' \strong{unicol}, 2023-06-24.
#'
#' @source
#' Color definitions are based on \href{https://www.yorku.ca}{York}'s
#' \href{https://www.yorku.ca/brand/}{Brand standards} (PDF).
#'
#' @examples
#' yorku_2
#' unikn::seecol(yorku_2, main = "Secondary colors of York University, CA") # view palette
#'
#' @family Canadian university color palettes
#'
#' @seealso
#' \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
yorku_2 <- unikn::newpal(col = c("#AF0D1A", "#810001", "#3AC2EF", "#ACE6F8",
"#E1DFDC", "#D6CFCA", "#B7AEA9", "#686260"),
names = c("York red medium", "York red dark", "bright blue", "York light blue",
"York light grey", "York pewter", "York grey medium", "York grey dark"),
as_df = FALSE)
# # Check:
# unikn::seecol(yorku_1, main = "Primary colors of the York University", col_bg = "lightgrey")
# unikn::seecol(yorku_2, main = "Secondary colors of the York University", col_bg = "white")
## ToDo: --------
# - etc.
## eof. ----------