Eureka/tools/bloom-sheet/page.tex
Eureka 0c3f3e4831 bloom-sheet: visitors are drawn with the plant's pen, not pasted in
An SVG used to arrive as a PDF on top of the page, in its own colours and
line quality. It now parses into marks: stroked shapes go through ribbon and
neonfill as weighted lines, a fill under a stroke becomes a petal's wash, and
bare fills become solid neon. Colours snap to the palette and near-black paints
the ground, except in an all-black drawing, which would vanish. All of it must
touch, a closed outline counting as covering its inside. Text, images and
gradients are refused before the two minute render. rsvg-convert and graphicx
are gone; python3-svgelements and python3-shapely replace them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 15:36:43 +01:00

103 lines
4.6 KiB
TeX

% A bloom sheet: one A4 page, GameCult navy with a neon garden.
% bloom_sheet.py fills the three @@ markers; grow.py writes layer.tex.
% Every panel is a fitting tcolorbox, so its type shrinks to whatever room it gets.
\documentclass{article}
\usepackage[paperwidth=210mm,paperheight=297mm,margin=0mm]{geometry}
\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{array}
\usepackage[most]{tcolorbox}
\tcbuselibrary{fitting}
% ---------- GameCult palette (gamecult-site quartz.config.ts), plus neon ----------
\definecolor{ground}{HTML}{07111A}
\definecolor{groundtop}{HTML}{03070D}
\definecolor{groundfoot}{HTML}{09141F}
\definecolor{panelbg}{HTML}{0A1722}
\definecolor{heading}{HTML}{EEF5FF}
\definecolor{body}{HTML}{B7C7D9}
\definecolor{muted}{HTML}{7488A0}
\definecolor{neonorange}{HTML}{FF8A2A}
\definecolor{neonsky}{HTML}{59B7FF}
\definecolor{neonviolet}{HTML}{8F84FF}
\definecolor{neonrose}{HTML}{FF6FAE} % not a brand colour: the "cozy" note
\definecolor{neonwhite}{HTML}{EEF5FF}
\colorlet{accent}{neonorange}
@@FONTS@@
% ---------- Neon primitives, called by the generated layer ----------
% A filled weighted stroke with two halos; #2 is the percent of colour the core keeps.
\newcommand{\neonfill}[3]{\path[
preaction={draw=#1, line width=1.7pt, draw opacity=0.09, line join=round},
preaction={draw=#1, line width=0.8pt, draw opacity=0.18, line join=round},
fill=#1!#2!white] #3;}
\newcommand{\neondot}[4]{%
\fill[#1, opacity=0.10] (#2,#3) circle ({2.4*#4});
\fill[#1, opacity=0.22] (#2,#3) circle ({1.5*#4});
\fill[#1!55!white] (#2,#3) circle (#4);}
\newcommand{\petalwash}[2]{\fill[#1, opacity=0.14] #2;}
\newcommand{\neonframe}[2]{%
\fill[panelbg, opacity=0.88] #2;
\draw[#1, line width=3pt, opacity=0.06] #2;
\draw[#1, line width=1.4pt, opacity=0.14] #2;
\draw[#1!70!white, line width=0.45pt] #2;}
% ---------- Text atoms ----------
% All of these live in the preamble: a macro with parameters defined inside a
% panel's argument breaks tcolorbox fit ("Illegal parameter number"). Nothing
% here sets an absolute size for body text: fit scales the base size and size
% commands escape it. \sub is the one relative label.
\newcommand{\head}[1]{{\labelfont\color{accent}\MakeUppercase{#1}}\par\vspace{0.25em}}
\newcommand{\sub}[1]{\par\vspace{0.25em}{\labelfont\color{muted}\MakeUppercase{#1}}\par}
% \leavevmode: a \color at the start of a table cell otherwise drops the cell a line.
\DeclareRobustCommand{\code}[1]{\leavevmode{\numfont\color{neonsky}#1}}
\DeclareRobustCommand{\strong}[1]{\leavevmode{\bfseries\color{heading}#1}}
\DeclareRobustCommand{\soft}[1]{\leavevmode{\speakfont\color{heading}#1}}
\DeclareRobustCommand{\faint}[1]{\leavevmode{\color{muted}#1}}
% One list item: depth, its marker, its text.
\newcommand{\li}[3]{\par{\leftskip=\dimexpr #1em - 1em\relax\hangindent=1em\hangafter=1\noindent\makebox[1em][l]{\color{accent}#2}#3\par}}
\newcommand{\quoted}[1]{\par{\leftskip=0.8em\color{heading}#1\par}}
\newcommand{\codeline}[1]{\par{\numfont\color{neonsky}\hangindent=1em\hangafter=1\noindent#1\par}}
\newcommand{\hairline}{\par\vspace{0.2em}{\color{muted}\rule{\linewidth}{0.2pt}}\par\vspace{0.2em}}
\newcommand{\cell}[1]{\raggedright\arraybackslash#1}
% ---------- One panel ----------
% \panel{x}{y}{w}{h}{colour}{content}, mm from the page's bottom left.
% The frame is drawn by the generated layer; this only sets the text.
% Padding 3.1mm keeps text clear of corner radii up to ~10mm.
\newcommand{\panel}[6]{%
\node[anchor=south west, inner sep=0pt] at (#1mm,#2mm) {%
\begin{tcolorbox}[blank, fit, width=#3mm, height=#4mm,
left=3.1mm, right=3.1mm, top=3mm, bottom=2.6mm,
fontupper=\color{body}\linespread{1.02}\selectfont,
before upper={\colorlet{accent}{#5}\parindent0pt\parskip0.14em\raggedright}]
#6
\end{tcolorbox}};}
@@CONTENTS@@
\pagecolor{ground}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[remember picture, overlay, x=1mm, y=1mm]
\begin{scope}[shift={(current page.south west)}]
% ---- ground: the site's vertical gradient and its three coloured radials ----
% Radials are stacks of faint circles; one opaque-ish circle shows a hard edge.
\shade[top color=groundtop, bottom color=groundfoot, middle color=ground] (0,0) rectangle (210,297);
\foreach \i in {1,...,32} {
\fill[neonviolet, opacity=0.0060] (38,267) circle ({87*\i/32});
\fill[neonsky, opacity=0.0050] (109,297) circle ({100*\i/32});
\fill[neonorange, opacity=0.0065] (164,255) circle ({65*\i/32});
}
\foreach \i in {1,...,24} {\fill[neonrose, opacity=0.0028] (40,30) circle ({60*\i/24});}
\input{layer.tex}
@@TITLE@@
\end{scope}
\end{tikzpicture}
\end{document}