-
Notifications
You must be signed in to change notification settings - Fork 5
/
beamercolorthemeNord.sty
130 lines (111 loc) · 5.2 KB
/
beamercolorthemeNord.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
% Copyright 2020 by Junwei Wang <i.junwei.wang@gmail.com>
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
\mode<presentation>
%%%%%%%%%%% Nord color scheme
%% https://www.nordtheme.com
% Polar Night
\definecolor{NordDarkBlack}{HTML}{2E3440} % nord0
\definecolor{NordBlack}{HTML}{3B4252} % nord1
\definecolor{NordMediumBlack}{HTML}{434C5e} % nord2
\definecolor{NordBrightBlack}{HTML}{4C566A} % nord3
% Snow Storm
\definecolor{NordWhite}{HTML}{D8DEE9} % nord4
\definecolor{NordBrighterWhite}{HTML}{E5E9F0} % nord5
\definecolor{NordBrightestWhite}{HTML}{ECEFF4} % nord6
% Frost
\definecolor{NordCyan}{HTML}{8FBCBB} % nord7
\definecolor{NordBrightCyan}{HTML}{88C0D0} % nord8
\definecolor{NordBlue}{HTML}{81A1C1} % nord9
\definecolor{NordBrightBlue}{HTML}{5E81AC} % nord10
% Aurora
\definecolor{NordRed}{HTML}{BF616A} % nord11
\definecolor{NordOrange}{HTML}{D08770} % nord12
\definecolor{NordYellow}{HTML}{EBCB8B} % nord13
\definecolor{NordGreen}{HTML}{A3BE8C} % nord14
\definecolor{NordMagenta}{HTML}{B48EAD} % nord15
%%%%% create alias for colors according to usage
\DeclareOptionBeamer{style}{\def\beamer@nordtheme@style{#1}}
\ExecuteOptionsBeamer{style=dark} % `dark` will be default if nothing is given
\ProcessOptionsBeamer
\def\beamer@nordtheme@styledark{dark}%
\def\beamer@nordtheme@stylelight{light}%
\colorlet{ColorAlertedText}{NordRed}
\colorlet{ColorSubtitle}{NordBlue}
\colorlet{ColorSubsectionInToc}{ColorSubtitle}
\ifx\beamer@nordtheme@style\beamer@nordtheme@styledark%
\colorlet{ColorBackground}{NordBlack}
\colorlet{ColorText}{NordWhite}
\colorlet{ColorExampleText}{NordBrightCyan}
\colorlet{ColorStructure}{NordCyan}
\colorlet{ColorTitle}{NordGreen}
\colorlet{ColorSubsectionInTocShaded}{NordCyan!20!NordBrightBlack}
\colorlet{ColorItemizeItem}{NordGreen}
\colorlet{ColorBlockTitleBg}{NordBlack!80}
\colorlet{ColorExampleBlockTitleBg}{ColorBlockTitleBg}
\colorlet{ColorAlertedBlockTitleBg}{ColorBlockTitleBg}
\colorlet{ColorBlockBodyBg}{NordGreen!50!NordBlack}
\colorlet{ColorExampleBlockBodyBg}{NordBrightCyan!50!NordBlack}
\colorlet{ColorAlertedBlockBodyBg}{NordRed!50!NordBlack}
\colorlet{ColorBlockBodyFg}{NordCyan}
\colorlet{ColorExampleBlockBodyFg}{NordWhite}
\colorlet{ColorAlertedBlockBodyFg}{NordWhite}
\else%
\ifx\beamer@nordtheme@style\beamer@nordtheme@stylelight%
\colorlet{ColorBackground}{NordBrightestWhite}
\colorlet{ColorText}{NordBrightBlack}
\colorlet{ColorExampleText}{NordCyan}
\colorlet{ColorStructure}{NordBrightCyan}
\colorlet{ColorTitle}{NordBrightBlue}
\colorlet{ColorSubtitle}{NordBlue}
\colorlet{ColorSubsectionInTocShaded}{ColorSubsectionInToc!50!ColorBackground}
\colorlet{ColorItemizeItem}{ColorStructure}
\colorlet{ColorBlockTitleBg}{NordGreen!50}
\colorlet{ColorExampleBlockTitleBg}{ColorExampleText!50}
\colorlet{ColorAlertedBlockTitleBg}{ColorAlertedText!50}
\colorlet{ColorBlockBodyBg}{NordGreen!20}
\colorlet{ColorExampleBlockBodyBg}{ColorExampleText!20}
\colorlet{ColorAlertedBlockBodyBg}{ColorAlertedText!20}
\colorlet{ColorBlockBodyFg}{ColorText}
\colorlet{ColorExampleBlockBodyFg}{ColorText}
\colorlet{ColorAlertedBlockBodyFg}{ColorText}
\else%
\PackageError{beamercolorthemeNord}{Unknow style option `\beamer@nordtheme@style`}{extra help}
\fi%
\fi%
\colorlet{ColorNormalText}{ColorText}
\colorlet{ColorFrameTitle}{ColorTitle}
\colorlet{ColorFrameSubtitle}{ColorSubtitle}
\colorlet{ColorSectionInToc}{ColorTitle}
\colorlet{ColorEnumerateColor}{ColorItemizeItem}
\colorlet{ColorSectionInHeadFoot}{ColorStructure}
%%%%% set beamer color
\setbeamercolor*{background canvas}{bg=ColorBackground}
\setbeamercolor*{normal text}{fg=ColorNormalText}
\setbeamercolor*{alerted text}{fg=ColorAlertedText}
\setbeamercolor*{example text}{fg=ColorExampleText}
\setbeamercolor*{structure}{fg=ColorStructure}
\setbeamercolor*{title}{fg=ColorTitle}
\setbeamercolor*{subtitle}{fg=ColorSubtitle}
\setbeamercolor*{frametitle}{fg=ColorFrameTitle}
\setbeamercolor*{framesubtitle}{fg=ColorFrameSubtitle}
\setbeamercolor*{section in toc}{fg=ColorSectionInToc}
\setbeamercolor*{subsection in toc}{fg=ColorSubsectionInToc}
\setbeamercolor*{subsection in toc shaded}{fg=ColorSubsectionInTocShaded}
\setbeamercolor*{itemize item}{fg=ColorItemizeItem}
\setbeamercolor*{enumerate item}{fg=ColorEnumerateColor}
\setbeamercolor*{section in head/foot}{bg=ColorBackground, fg=ColorSectionInHeadFoot}
\setbeamercolor{block title}{bg=ColorBlockTitleBg,fg=NordGreen}
\setbeamercolor{block title example}{bg=ColorExampleBlockTitleBg,parent={example text}}
\setbeamercolor{block title alerted}{bg=ColorAlertedBlockTitleBg,parent={alerted text}}
\setbeamercolor{block body}{bg=ColorBlockBodyBg,fg=ColorBlockBodyFg}
\setbeamercolor{block body example}{bg=ColorExampleBlockBodyBg,fg=ColorExampleBlockBodyFg}
\setbeamercolor{block body alerted}{bg=ColorAlertedBlockBodyBg,fg=ColorAlertedBlockBodyFg}
\setbeamercolor{caption}{fg=NordBrightBlue}
\mode
<all>
\endinput