%% 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}{102, 217, 239}%
		\definecolor{fta}{RGB}{253, 151, 31}%
		\definecolor{fpa}{RGB}{253, 151, 31}%
		\definecolor{fif}{RGB}{249, 38, 114}%
		\definecolor{fdf}{RGB}{144, 231, 247}%
		\definecolor{fnv}{RGB}{96, 207, 48}%
		\definecolor{fnw}{RGB}{255, 128, 244}%
		\definecolor{ffl}{RGB}{108 ,178, 255}%
		\definecolor{fgp}{RGB}{166, 226, 46}%
		\definecolor{ts}{RGB}{61, 61, 61}%
		\definecolor{tc}{RGB}{140, 140, 140}%
		\definecolor{bg}{RGB}{36, 36, 36}%
		\definecolor{bt}{RGB}{248, 248, 242}%
		}\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}