| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% RWTH-CI -- Corporate Design for RWTH Aachen University |
| 4 |
% ---------------------------------------------------------------------------- |
| 5 |
% |
| 6 |
% Copyright (C) 2025–2026 by Marei Peischl <[email protected]> and Lukas C. Bossert |
| 7 |
% |
| 8 |
% ============================================================================ |
| 9 |
% This work may be distributed and/or modified under the |
| 10 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 11 |
% of this license or (at your option) any later version. |
| 12 |
% The latest version of this license is in |
| 13 |
% http://www.latex-project.org/lppl.txt |
| 14 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 15 |
% version 2008/05/04 or later. |
| 16 |
% |
| 17 |
% This work has the LPPL maintenance status `maintained'. |
| 18 |
% |
| 19 |
% The Current Maintainer of this work is |
| 20 |
% Marei Peischl [email protected] |
| 21 |
% |
| 22 |
% The development repository can be found at |
| 23 |
% https://gitlab.git.nrw/rwth-it-center/rwth-latex-templates/rwth-ci |
| 24 |
% Please use the issue tracker for feedback! |
| 25 |
% |
| 26 |
% ============================================================================ |
| 27 |
% |
| 28 |
% \fi |
| 29 |
% \iffalse |
| 30 |
%<*driver> |
| 31 |
\ProvidesFile{rwth-colors.dtx} |
| 32 |
[2026-04-03 v1.2 Color setup for RWTH-CI, Corporate Design of RWTH Aachen University] |
| 33 |
%</driver> |
| 34 |
%<@@=ptxcd> |
| 35 |
%<*identification> |
| 36 |
\NeedsTeXFormat{LaTeX2e}[2022-10-01] |
| 37 |
%<package>\ProvidesExplPackage{rwth-colors}{2026-04-03}{1.2}{Color setup for RWTH-CI} |
| 38 |
%</identification> |
| 39 |
%<*driver> |
| 40 |
\providecommand*{\PtxcdDocDTXfiles}{rwth-colors.dtx} |
| 41 |
\providecommand*{\PtxcdDocTitle}{\pkg{rwth-colors}~--~\LaTeX{}~color~setup~for~RWTH-CI} |
| 42 |
\input{rwth-ci.dtx} |
| 43 |
%</driver> |
| 44 |
% \fi |
| 45 |
% \begin{documentation} |
| 46 |
% \section{Color setup – \pkg{rwth-colors.sty}} |
| 47 |
% The colors setup is done using the \pkg{xcolor} package. |
| 48 |
% All mechanims described in the corresponding documentation may be used. |
| 49 |
% |
| 50 |
% All design specific colors are defined according to the guideline \cite{rwth-ci-guideline}. |
| 51 |
% The predefined colors are listed below: |
| 52 |
% |
| 53 |
% \begingroup |
| 54 |
% \raggedright |
| 55 |
% \ExplSyntaxOn |
| 56 |
% \renewcommand*{\definecolor}[3]{ |
| 57 |
% \if_mode_vertical: |
| 58 |
% \bool_set_true:N \l_tmpa_bool |
| 59 |
% \tl_range:nnn {#1} {1} {-5}\hfill |
| 60 |
% \tl_range:nnn {#1} {-4} {-1}\space |
| 61 |
% \else: |
| 62 |
% \quad\tl_range:nnn {#1} {-3} {-1}\space |
| 63 |
% \fi: |
| 64 |
% \textcolor{#1}{\rule{1cm}{\ht\strutbox}} |
| 65 |
% } |
| 66 |
% \begingroup\cctab_select:N \c_document_cctab \input{rwthcolors.def}\endgroup |
| 67 |
% \ExplSyntaxOff |
| 68 |
% \endgroup |
| 69 |
% |
| 70 |
% \bigskip |
| 71 |
% \noindent As one might realize the shadings are defined directly. |
| 72 |
% Those should be used to stick to the CI guideline \cite{rwth-ci-guideline} instead of using the color mixing provided by \pkg{xcolor}. |
| 73 |
% \end{documentation} |
| 74 |
% \begin{implementation} |
| 75 |
% \iffalse |
| 76 |
%<*declareoptions> |
| 77 |
% \fi |
| 78 |
% \begin{macrocode} |
| 79 |
\tl_new:N \g_@@_colormode_tl |
| 80 |
\keys_define:nn {ptxcd/colors} { |
| 81 |
% \end{macrocode} |
| 82 |
% \iffalse |
| 83 |
%</declareoptions> |
| 84 |
%<*options> |
| 85 |
% \fi |
| 86 |
% \end{implementation} |
| 87 |
% \begin{documentation} |
| 88 |
% \subsection{Package specific options} |
| 89 |
% \DescribeKeyOption*{colormode=cmyk/RGB}{Depends on document type}* |
| 90 |
% \label{sec:colormode} |
| 91 |
% The colormode can be selected to overwrite the default setting. |
| 92 |
% Please be aware, that there is a difference in casing and \code{RGB} has to be used uppercase and \code{cmyk} lowercase. |
| 93 |
% Internally the values between uppercase and lowercase model names would differ. |
| 94 |
% \end{documentation} |
| 95 |
% \begin{implementation} |
| 96 |
% \begin{optionenv}{colormode} |
| 97 |
% \begin{macrocode} |
| 98 |
colormode .choices:nn = {cmyk,RGB}{ |
| 99 |
\@ifpackageloaded{xcolor}{ |
| 100 |
\selectcolormodel{\l_keys_value_tl} |
| 101 |
}{ |
| 102 |
\exp_args:No \PassOptionsToPackage{\l_keys_value_tl}{xcolor} |
| 103 |
\tl_gset:Ne \g_@@_colormode_tl {\str_lowercase:f {\l_keys_value_tl}} |
| 104 |
} |
| 105 |
}, |
| 106 |
colormode .usage:n = load, |
| 107 |
RGB .meta:n = {colormode=RGB}, |
| 108 |
cmyk .meta:n = {colormode=cmyk}, |
| 109 |
% \end{macrocode} |
| 110 |
% \end{optionenv} |
| 111 |
% \begin{macrocode} |
| 112 |
} |
| 113 |
\ProcessKeyOptions[ptxcd/colors] |
| 114 |
\RequirePackage{xcolor} |
| 115 |
|
| 116 |
\input{rwthcolors.def} |
| 117 |
% \end{macrocode} |
| 118 |
% \iffalse |
| 119 |
%</options> |
| 120 |
%<*package&body> |
| 121 |
% \fi |
| 122 |
% \begin{macrocode} |
| 123 |
|
| 124 |
% \end{macrocode} |
| 125 |
% \iffalse |
| 126 |
%</package&body> |
| 127 |
% \fi |
| 128 |
% \end{implementation} |
| 129 |
% \Finale |
| 130 |
\endinput |