%% CAUTION: The macros specified in this file 
%% must work in conjunction with the macros
%% specified in majixed.tex and/or plante.tex.
%% The files must be input simultaneously.

\catcode`@=11
\@ifpackageloaded{xcolor}{}{\usepackage{xcolor}}

%% Light & dark mode switch
\let\daynight\@firstoftwo
\def\dayswitch{\let\daynight\@firstoftwo}
\def\nightswitch{\let\daynight\@secondoftwo}

\edef\hour{\the\numexpr\time/60}

% \ifnum\hour>18 \nightswitch \else \ifnum\hour<6 \nightswitch \fi \fi
\nightswitch

\protected\def\colors{%
	\daynight{%
		%%%%%% NO DAY COLORS %%%%%%
		}{%% Night colors
		\definecolor{sg}{RGB}{86, 174, 90}%
		\definecolor{sy}{RGB}{233, 161, 94}%
		\definecolor{sr}{RGB}{238, 130, 119}%
		\definecolor{sc}{RGB}{0, 0, 0}%
		\definecolor{fcs}{RGB}{135, 160, 190}%
		\definecolor{fta}{RGB}{196, 138, 115}%
		\definecolor{fpa}{RGB}{228, 204, 146}%
		\definecolor{fif}{RGB}{178, 101, 107}%
		\definecolor{fdf}{RGB}{147, 189, 205}%
		\definecolor{fnv}{RGB}{167, 189, 106}%
		\definecolor{fnw}{RGB}{174, 143, 171}%
		\definecolor{ffl}{RGB}{152, 186, 186}%
		\definecolor{fgp}{RGB}{167, 189, 106}%
		\definecolor{ts}{RGB}{59, 65, 80}%
		\definecolor{tc}{RGB}{79, 86, 103}%
		\definecolor{bg}{RGB}{47, 51, 62}%
		\definecolor{bt}{RGB}{236, 237, 243}%
		}\colorsuse
}%
\protected\def\colorsuse{\color{bt}\pagecolor{bg}} \colors
% \protected\def\daycolors{\dayswitch\colors}
\protected\def\nightcolors{\nightswitch\colors}
\def\color@reset#1{\iappto\colors{#1}#1}