% Copyright 2026 Open-Guji (https://github.com/open-guji) % % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % http://www.apache.org/licenses/LICENSE-2.0 % % Unless required by applicable law or agreed to in writing, software % distributed under the License is distributed on an "AS IS" BASIS, % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % See the License for the specific language governing permissions and % limitations under the License. % luatex-cn-guji-SiKuQuanShu-colored.cfg % Siku Quanshu Colored Layout (四库全书彩色版) % Inherits from default (black & white) and adds color settings % ============================================================================= % Load base configuration (black & white version) % ============================================================================= \input{luatex-cn-guji-default.cfg} % ============================================================================= % Override with colored settings % ============================================================================= \gujiSetup{ % Colors (RGB 0-255 format) - Siku Quanshu traditional colors border-color = {180, 95, 75}, font-color = {35, 25, 20} } % ============================================================================= % Default Background Image % ============================================================================= % Automatically apply the Siku Quanshu background texture to all pages. % Supports split page mode: shows left/right half of background accordingly. \RequirePackage{tikz} \AddToHook{shipout/background}{% \updateSplitPageStatus \ifSplitPageEnabled % Split page mode: show left or right half of background \updateSplitPageSide \begin{tikzpicture}[overlay] \ifSplitPageRight % Right page: show right half of background (clip left half) \clip (0, -\paperheight) rectangle (\paperwidth, 0); \node[anchor=south~east, inner~sep=0pt] at (\paperwidth, -\paperheight) { \includegraphics[width=\splitpageSourceWidth, height=\splitpageSourceHeight]{luatex-cn-guji-SiKuQuanShu-colored-background.png} }; \else % Left page: show left half of background (clip right half) \clip (0, -\paperheight) rectangle (\paperwidth, 0); \node[anchor=south~west, inner~sep=0pt] at (0, -\paperheight) { \includegraphics[width=\splitpageSourceWidth, height=\splitpageSourceHeight]{luatex-cn-guji-SiKuQuanShu-colored-background.png} }; \fi \end{tikzpicture} \else % Normal mode: show full background \begin{tikzpicture}[overlay] \node[anchor=south~west, inner~sep=0pt] at (0, -\paperheight) { \includegraphics[width=\paperwidth, height=\paperheight]{luatex-cn-guji-SiKuQuanShu-colored-background.png} }; \end{tikzpicture} \fi } % ============================================================================= % Default Stamp Color for Colored Template % ============================================================================= % Define a color matching the traditional Siku Quanshu seal color: RGB(160, 65, 50) \definecolor{印章红}{RGB}{160, 65, 50} \endinput