forked from FvNCCR228/SCU-Beamer-Theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeamercolorthemescu.sty
248 lines (223 loc) · 9.52 KB
/
beamercolorthemescu.sty
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
% This is file `beamercolorthemescu.sty'.
% Copyright (C) 2021-2024 by Linrong Wu.
% Version: 2024/10/31 v1.3e (Original Version: 2022/03/10 v1.2a).
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.
%
% 本文件为 SCU_Beamer_Slide-demo 颜色主题宏包文件.
% !请勿轻易改动此文档中代码.
%%%% ----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{beamercolorthemescu}[2024/10/31 v1.3e, SCU Beamer Theme(Color Theme)]
%%%% ----------------------------------------------------------------
% ----------------
% Declare of Options
% Confirmed in v1.3c(2024/04/16).
% Established in v1.2a(2022/03/10).
% Updated in v1.3a(2022/03/16), v1.3b(2022/04/13).
% ----------------
% CMD:: \DeclareOptionBeamer - 声明参数.
% CMD:: \ExecuteOptionsBeamer - 预执行参数.
% CMD:: \ProcessOptionsBeamer - 处理参数.
% ----------------
% KEY:: ColorDisplay.
% VALUE:: JXred | BSblue | Custom.
\DeclareOptionBeamer{ColorDisplay}{\def\beamer@scu@ColorDisplay{#1}}
\ExecuteOptionsBeamer{ColorDisplay=JXred}
\ProcessOptionsBeamer
% ----------------
% ----------------
% Declare of Packages
% Confirmed in v1.3c(2024/04/16).
% Established in v1.3b(2022/04/13).
% ----------------
% CMD:: \RequirePackage - 调用宏包.
% ----------------
\RequirePackage{xcolor}% xcolor: 设置颜色.
% ----------------
% ----------------
% Declare of Colors
% Confirmed in v1.3c(2024/04/16).
% Established in v1.2a(2022/03/10).
% Updated in v1.3a(2022/03/16).
% ----------------
% 依据四川大学VIS视觉识别系统(2014), 定义了主题色 scured, scugrey, 与辅助色 scublue, scugreen, scuyellow.
% 上述定义颜色均采用 CMYK 颜色模式.
% 注: 常用的颜色模式有 RGB 与 CMYK, 对应 LaTeX 中 rgb(0-1小数制, x/255), RGB(原始数值), cmyk(0-1小数制, x/100).
% ----------------
% CMD:: \definecolor - 依据颜色代码定义新颜色.
% CMD:: \colorlet - 依据已有颜色延申新颜色.
% ----------------
% COLOR:: 锦绣红 - scured - CMYK(12,92,95,20).
\definecolor{scured} {cmyk}{0.12,0.92,0.95,0.20}
\colorlet{scured10} {scured!10!white}
\colorlet{scured20} {scured!20!white}
\colorlet{scured30} {scured!30!white}
\colorlet{scured40} {scured!40!white}
\colorlet{scured50} {scured!50!white}
\colorlet{scured60} {scured!60!white}
\colorlet{scured70} {scured!70!white}
\colorlet{scured80} {scured!80!white}
\colorlet{scured90} {scured!90!white}
% COLOR:: 优雅灰 - scugrey - CMYK(47,37,37,20).
\definecolor{scugrey} {cmyk}{0.47,0.37,0.37,0.00}
\colorlet{scugrey10} {scugrey!10!white}
\colorlet{scugrey20} {scugrey!20!white}
\colorlet{scugrey30} {scugrey!30!white}
\colorlet{scugrey40} {scugrey!40!white}
\colorlet{scugrey50} {scugrey!50!white}
\colorlet{scugrey60} {scugrey!60!white}
\colorlet{scugrey70} {scugrey!70!white}
\colorlet{scugrey80} {scugrey!80!white}
\colorlet{scugrey90} {scugrey!90!white}
% COLOR:: 宝石蓝 - scublue - CMYK(100,60,0,15).
\definecolor{scublue} {cmyk}{1.00,0.60,0.00,0.15}
\colorlet{scublue10} {scublue!10!white}
\colorlet{scublue20} {scublue!20!white}
\colorlet{scublue30} {scublue!30!white}
\colorlet{scublue40} {scublue!40!white}
\colorlet{scublue50} {scublue!50!white}
\colorlet{scublue60} {scublue!60!white}
\colorlet{scublue70} {scublue!70!white}
\colorlet{scublue80} {scublue!80!white}
\colorlet{scublue90} {scublue!90!white}
% COLOR:: 荷叶绿 - scugreen - CMYK(100,0,90,15).
\definecolor{scugreen} {cmyk}{1.00,0.00,0.90,0.15}
\colorlet{scugreen10} {scugreen!10!white}
\colorlet{scugreen20} {scugreen!20!white}
\colorlet{scugreen30} {scugreen!30!white}
\colorlet{scugreen40} {scugreen!40!white}
\colorlet{scugreen50} {scugreen!50!white}
\colorlet{scugreen60} {scugreen!60!white}
\colorlet{scugreen70} {scugreen!70!white}
\colorlet{scugreen80} {scugreen!80!white}
\colorlet{scugreen90} {scugreen!90!white}
% COLOR:: 银杏黄 - scuyellow - CMYK(0,40,100,15).
\definecolor{scuyellow}{cmyk}{0.00,0.40,1.00,0.15}
\colorlet{scuyellow10}{scuyellow!10!white}
\colorlet{scuyellow20}{scuyellow!20!white}
\colorlet{scuyellow30}{scuyellow!30!white}
\colorlet{scuyellow40}{scuyellow!40!white}
\colorlet{scuyellow50}{scuyellow!50!white}
\colorlet{scuyellow60}{scuyellow!60!white}
\colorlet{scuyellow70}{scuyellow!70!white}
\colorlet{scuyellow80}{scuyellow!80!white}
\colorlet{scuyellow90}{scuyellow!90!white}
% ----------------
\mode<presentation>
% ----------------
% Beamer Theme Color Mode Layout
% Confirmed in v1.3c(2024/04/16).
% Established in v1.3a(2022/03/16).
% Updated in v1.3c(2024/04/16).
% ----------------
% | PrimaryC | AuxiliaryC | SecondaryAuxiliaryC | IntersperseC ||
% | 主题色 | 辅助色 | 第二辅助色 | 点缀色 |
% --------------------------------------------------------------
% | NomalTextC | AlertedTextC | BackgroundC | BlockExampleC |
% | 普通文本色 | 强调文本色 | 背景主体色 | Example 区块色 |
% ------------------------------------------------------------
% | BlockDefinitionC | BlockLemmaC | BlockConditionC |
% | Definition 区块色 | Lemma 区块色| Condition 区块色 |
% ----------------
\if\EqualOptionsBeamer{ColorDisplay}{JXred}%
\colorlet{PrimaryC} {scured}
\colorlet{AuxiliaryC} {scugrey50}
\colorlet{SecondaryAuxiliaryC}{scugrey}
\colorlet{IntersperseC} {scured60}
\colorlet{NomalTextC} {black}
\colorlet{AlertedTextC} {scured90}
\colorlet{BackgroundC} {white}
\colorlet{BlockExampleC} {scugrey!80!black}
\colorlet{BlockDefinitionC} {scublue}
\colorlet{BlockLemmaC} {scugreen}
\colorlet{BlockConditionC} {scuyellow}
\colorlet{HighlightCodeLineC} {scured10}
\else\if\EqualOptionsBeamer{ColorDisplay}{BSblue}%
\colorlet{PrimaryC} {scublue}
\colorlet{AuxiliaryC} {scugrey50}
\colorlet{SecondaryAuxiliaryC}{scugrey}
\colorlet{IntersperseC} {scublue60}
\colorlet{NomalTextC} {black}
\colorlet{AlertedTextC} {scublue90}
\colorlet{BackgroundC} {white}
\colorlet{BlockExampleC} {scugrey!80!black}
\colorlet{BlockDefinitionC} {scured}
\colorlet{BlockLemmaC} {scugreen}
\colorlet{BlockConditionC} {scuyellow}
\colorlet{HighlightCodeLineC} {scublue10}
\else\if\EqualOptionsBeamer{ColorDisplay}{Custom}%
\def\beamer@scu@colorprovide#1#2{%
% #1:: colorname.
% #2:: set color.
\@ifundefined{\string\color@#1}{\colorlet{#1}{#2}}{}%
}
\beamer@scu@colorprovide{PrimaryC} {scured}
\beamer@scu@colorprovide{AuxiliaryC} {scugrey50}
\beamer@scu@colorprovide{SecondaryAuxiliaryC}{scugrey}
\beamer@scu@colorprovide{IntersperseC} {scured60}
\beamer@scu@colorprovide{NomalTextC} {black}
\beamer@scu@colorprovide{AlertedTextC} {scured90}
\beamer@scu@colorprovide{BackgroundC} {white}
\beamer@scu@colorprovide{BlockExampleC} {scugrey!80!black}
\beamer@scu@colorprovide{BlockDefinitionC} {scublue}
\beamer@scu@colorprovide{BlockLemmaC} {scugreen}
\beamer@scu@colorprovide{BlockConditionC} {scuyellow}
\beamer@scu@colorprovide{HighlightCodeLineC} {scured10}
\fi\fi\fi
% ----------------
% ----------------
% Beamer Theme Color Layout
% Confirmed in v1.3e(2024/10/31).
% Established in v1.2a(2022/03/10).
% Updated in v1.3a(2022/03/16), v1.3c(2024/04/16), v1.3e(2024/10/31).
% ----------------
% 基本颜色设置.
\setbeamercolor{structure}{fg=PrimaryC}
\setbeamercolor{background canvas}{bg=BackgroundC}
% 调色板颜色设置.
\setbeamercolor{palette primary} {fg=BackgroundC, bg=PrimaryC}
\setbeamercolor{palette secondary} {fg=NomalTextC}
\setbeamercolor{palette tertiary} {fg=AlertedTextC}
\setbeamercolor{palette quaternary}{fg=AuxiliaryC, bg=IntersperseC}
% 页眉页脚颜色设置.
\setbeamercolor{section in head/foot} {parent=palette primary}
\setbeamercolor{subsection in head/foot} {parent=structure}
\setbeamercolor{frametitle} {parent=structure}
\setbeamercolor{framesubtitle} {parent=palette tertiary}
\setbeamercolor{author in head/foot} {parent=palette secondary}
\setbeamercolor{title in head/foot} {parent=structure}
\setbeamercolor{framenumber in head/foot}{parent=structure}
% 封页颜色设置.
\setbeamercolor{title} {bg=BackgroundC, fg=PrimaryC}
\setbeamercolor{subtitle} {bg=BackgroundC, fg=PrimaryC}
%\setbeamercolor{author} {fg=white,bg=}
%\setbeamercolor{date} {fg=white,bg=}
\setbeamercolor{titlepageheader}{bg=white, fg=black}
\setbeamercolor{titlepagefooter}{bg=white, fg=black}
% 区块颜色设置.
\setbeamercolor*{block title} {parent=palette primary}
\setbeamercolor*{block body} {fg=, bg=scured40}
\setbeamercolor*{block title example}{fg=white, bg=scublue}
\setbeamercolor*{block body example} {fg=, bg=scublue40}
\setbeamercolor*{block title alerted}{parent=palette primary}
\setbeamercolor*{block body alerted} {fg=, bg=scured40}
% 列表颜色设置.
\setbeamercolor{item} {parent=structure}
\setbeamercolor{item projected} {parent=structure}
\setbeamercolor{enumerate item} {parent=structure}
\setbeamercolor{enumerate subitem} {parent=structure}
\setbeamercolor{enumerate subsubitem}{parent=structure}
% 文本颜色设置.
\setbeamercolor*{normal text} {parent=palette secondary}
\setbeamercolor*{alerted text}{parent=palette tertiary}
% ----------------
%%%% ----------------------------------------------------------------
\endinput
%%%% ----------------------------------------------------------------
% End of file `beamercolorthemescu.sty'.