Green instead of gold, and a leaf that reads at 16px

The brand accent was rune gold. It is now mallorn green: --gold becomes
--leaf in tokens.css and everywhere it resolved, and the mark's wafer is
the green of the leaves lembas travels wrapped in rather than the biscuit
inside. Yellow is left to mean exactly one thing in the interface -- a
warning -- instead of two.

Two knock-on choices the rename forced:

  - Code keywords move from the brand accent to --warning. Strings are
    --success, which is green; keywords in leaf green beside them is not
    a colour scheme.
  - --success itself leans teal now. Two greens a hue apart read as one
    colour rendered badly, and an unread dot has to be tellable from a
    brand badge at a glance.

The mark is redrawn, not just recoloured. The blade is ovate -- widest a
third up from the base, rounded where the stem meets it, drawn out only
at the tip -- because the old one was pointed at both ends and read as an
eye. It is also much larger relative to the tile: at 16px the silhouette
is all that survives, and a small leaf on a large tile is a green square
with a smudge on it. Veins sweep towards the tip and shorten as the blade
narrows. The score cross is thinner and fainter so it stays texture.

A single diagonal score was tried first and rejected: behind a diagonal
leaf it does not read as scoring, it reads as a line struck through the
mark.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jaroslav Beneš
2026-07-31 22:24:53 +02:00
parent 2a79d962a3
commit 71dc46455c
30 changed files with 322 additions and 281 deletions
+76 -48
View File
@@ -64,18 +64,26 @@ TAGLINE = "Waybread for the long road of thought"
ACCENT_GLYPHS = frozenset({0, 1, 3})
# --- Palette -----------------------------------------------------------------
GOLD_LIGHT = "#EACB74"
GOLD = "#C9A227"
GOLD_DARK = "#916F13"
GOLD_SCORE = "#7A5C10"
GOLD_HILIGHT = "#F6E3A8"
RUNE_GOLD = "#E0B252"
# The wafer is mallorn green because that is how lembas travels: wrapped in the
# leaves, not bare. Green also leaves yellow free to mean one thing in the
# interface -- a warning -- instead of two.
WAFER_LIGHT = "#7FB758"
WAFER = "#4C8C33"
WAFER_DARK = "#2A5522"
WAFER_SCORE = "#1F4019"
WAFER_HILIGHT = "#C7E7A6"
# The brand green, matching --leaf in tokens.css. Type accent and the drifting
# leaves on the banner.
MALLORN = "#9BCC5A"
MALLORN_DEEP = "#4C7A22"
LEAF_EDGE = "#93A5B6"
LEAF_LIGHT = "#F1F6FA"
LEAF_MID = "#B8C7D5"
LEAF_VEIN = "#61758A"
LEAF_STEM = "#8A9AA8"
# The blade stays pale: a leaf the same green as the wafer it lies on has no
# silhouette, and the silhouette is the whole mark at 16px.
LEAF_EDGE = "#9DB49A"
LEAF_LIGHT = "#F3F8EE"
LEAF_MID = "#C6D8BE"
LEAF_VEIN = "#57734F"
LEAF_STEM = "#8B9E86"
NIGHT_TOP = "#080B0F"
NIGHT_MID = "#101822"
@@ -85,22 +93,37 @@ INK = "#1B1F23"
MUTED = "#9AA7B4"
# --- The mallorn leaf --------------------------------------------------------
# Drawn once, in a 64x64 box, and reused everywhere. Tuned so the silhouette
# still reads as a leaf at 16px, where veins and score lines disappear.
# Drawn once, in a 64x64 box, and reused everywhere. The blade runs corner to
# corner and fills most of the tile, because at 16px the only thing that
# survives is the outline: a small leaf on a large tile reads as a green square
# with a smudge on it. Veins and the score line are detail-only for the same
# reason.
# Ovate, not lens-shaped: the widest point sits about a third up from the base,
# the base is a rounded cusp where the stem meets it, and only the tip is drawn
# out to a point. A blade pointed at both ends reads as an eye.
LEAF_BLADE = (
"M20.5 45.5 C13.8 31.7 23.8 20.9 45.5 18.5 C49.8 35 39.8 45.8 20.5 45.5 Z"
"M21 46 C19.6 40.5 20.4 34.2 23.4 30.5 C27.5 25.5 35 20.5 46 18 "
"C43.5 26.5 40.5 36.5 36.1 41.9 C33 45.6 26.5 47 21 46 Z"
)
LEAF_MIDRIB = "M20.5 45.5 C28 38 36 29 45.5 18.5"
LEAF_STEM_PATH = "M21.2 44.8 L17 49.4"
LEAF_MIDRIB = "M21 46 Q30.5 34.5 46 18"
LEAF_STEM_PATH = "M21.4 45.6 L16.3 51.2"
# Veins sweep towards the tip rather than leaving the midrib square-on, and
# shorten as the blade narrows.
LEAF_VEINS = [
"M26.9 38.8 Q25.2 35.8 24.9 32.1",
"M32.3 33.1 Q30.9 30.3 30.4 26.9",
"M37.8 27.0 Q36.6 24.6 36.3 21.7",
"M26.9 38.8 Q30.5 40.1 33.7 40.3",
"M32.3 33.1 Q35.8 34.3 38.6 34.5",
"M37.8 27.0 Q40.8 27.9 43.2 28.1",
"M26.8 39.2 Q24.9 37.4 24.7 35.3",
"M32.0 33.3 Q30.1 31.5 29.8 29.2",
"M37.8 26.9 Q36.4 25.6 36.1 23.7",
"M26.8 39.2 Q28.7 40.9 30.7 40.8",
"M32.0 33.3 Q33.9 35.0 36.1 34.9",
"M37.8 26.9 Q39.4 28.2 40.9 28.2",
]
# The wafer's break-lines. Axis-aligned and crossed, deliberately: a single
# diagonal behind a diagonal leaf does not read as scoring, it reads as a line
# struck through the mark. Thin and faint, so it is texture and not structure.
WAFER_SCORES = ("M32 5 V59", "M5 32 H59")
WAFER_SCORE_HILIGHTS = ("M33.1 5 V59", "M5 33.1 H59")
HEADER = '<svg xmlns="http://www.w3.org/2000/svg"'
@@ -193,10 +216,10 @@ def type_style(indent: str = " ") -> str:
"""
return f"""{indent}<style>
{indent} .base {{ fill: var(--lembas-ink, {INK}); }}
{indent} .accent {{ fill: var(--lembas-gold, {GOLD}); }}
{indent} .accent {{ fill: var(--lembas-leaf, {MALLORN_DEEP}); }}
{indent} @media (prefers-color-scheme: dark) {{
{indent} .base {{ fill: var(--lembas-ink, {PARCHMENT}); }}
{indent} .accent {{ fill: var(--lembas-gold, {RUNE_GOLD}); }}
{indent} .accent {{ fill: var(--lembas-leaf, {MALLORN}); }}
{indent} }}
{indent}</style>"""
@@ -205,9 +228,9 @@ def type_style(indent: str = " ") -> str:
def mark_defs(prefix: str) -> str:
return f""" <defs>
<linearGradient id="{prefix}-wafer" x1="0" y1="0" x2="0.3" y2="1">
<stop offset="0" stop-color="{GOLD_LIGHT}"/>
<stop offset="0.5" stop-color="{GOLD}"/>
<stop offset="1" stop-color="{GOLD_DARK}"/>
<stop offset="0" stop-color="{WAFER_LIGHT}"/>
<stop offset="0.5" stop-color="{WAFER}"/>
<stop offset="1" stop-color="{WAFER_DARK}"/>
</linearGradient>
<linearGradient id="{prefix}-leaf" x1="0.1" y1="1" x2="0.9" y2="0">
<stop offset="0" stop-color="{LEAF_EDGE}"/>
@@ -215,7 +238,7 @@ def mark_defs(prefix: str) -> str:
<stop offset="1" stop-color="{LEAF_MID}"/>
</linearGradient>
<clipPath id="{prefix}-clip">
<rect x="6" y="6" width="52" height="52" rx="13"/>
<rect x="5" y="5" width="54" height="54" rx="14"/>
</clipPath>
</defs>"""
@@ -223,23 +246,23 @@ def mark_defs(prefix: str) -> str:
def mark_body(prefix: str, *, detail: bool = True) -> str:
"""The wafer-and-leaf mark in a 64x64 box.
detail=False drops the score lines, rim and veins for small-size use.
detail=False drops the score line, rim and veins for small-size use.
"""
parts = [f' <rect x="6" y="6" width="52" height="52" rx="13" fill="url(#{prefix}-wafer)"/>']
parts = [f' <rect x="5" y="5" width="54" height="54" rx="14" fill="url(#{prefix}-wafer)"/>']
if detail:
scores = "\n".join(f' <path d="{s}"/>' for s in WAFER_SCORES)
hilights = "\n".join(f' <path d="{s}"/>' for s in WAFER_SCORE_HILIGHTS)
parts.append(f""" <g clip-path="url(#{prefix}-clip)" fill="none" stroke-linecap="round">
<g stroke="{GOLD_SCORE}" stroke-opacity="0.38" stroke-width="2">
<path d="M32 6 V58"/>
<path d="M6 32 H58"/>
<g stroke="{WAFER_SCORE}" stroke-opacity="0.30" stroke-width="1.8">
{scores}
</g>
<g stroke="{GOLD_HILIGHT}" stroke-opacity="0.3" stroke-width="1">
<path d="M33.2 6 V58"/>
<path d="M6 33.2 H58"/>
<g stroke="{WAFER_HILIGHT}" stroke-opacity="0.20" stroke-width="0.9">
{hilights}
</g>
</g>
<rect x="7.1" y="7.1" width="49.8" height="49.8" rx="11.9"
fill="none" stroke="{GOLD_SCORE}" stroke-opacity="0.3" stroke-width="1.2"/>""")
<rect x="6.1" y="6.1" width="51.8" height="51.8" rx="12.9"
fill="none" stroke="{WAFER_SCORE}" stroke-opacity="0.32" stroke-width="1.2"/>""")
parts.append(f""" <g>
<path d="{LEAF_STEM_PATH}" stroke="{LEAF_STEM}" stroke-width="3"
@@ -264,7 +287,7 @@ def build_logo_mark() -> str:
return f"""{HEADER} viewBox="0 0 64 64" width="64" height="64"
role="img" aria-label="LLeMbas">
<title>LLeMbas</title>
<desc>A silver mallorn leaf laid across a scored golden lembas wafer.</desc>
<desc>A pale mallorn leaf laid across a scored green lembas wafer.</desc>
{mark_defs("m")}
{mark_body("m")}
</svg>
@@ -272,14 +295,19 @@ def build_logo_mark() -> str:
def build_favicon() -> str:
"""Small-size variant: no score lines or veins, larger blade, tighter tile."""
"""Small-size variant: no score line or veins, larger blade, tighter tile.
The tile grows to the edge of the box and the leaf is scaled up again on top
of that: at 16px the padding of the full mark is several device pixels of
nothing, spent on a rounded corner nobody can see.
"""
return f"""{HEADER} viewBox="0 0 64 64" width="64" height="64"
role="img" aria-label="LLeMbas">
<title>LLeMbas</title>
{mark_defs("f")}
<rect x="2" y="2" width="60" height="60" rx="14" fill="url(#f-wafer)"/>
<g transform="translate(32 32) scale(1.16) translate(-32 -32)">
<path d="M20.6 44.6 L15.6 50.1" stroke="{LEAF_STEM}" stroke-width="3.4"
<rect x="1" y="1" width="62" height="62" rx="15" fill="url(#f-wafer)"/>
<g transform="translate(32 32) scale(1.1) translate(-32 -32)">
<path d="{LEAF_STEM_PATH}" stroke="{LEAF_STEM}" stroke-width="3.4"
stroke-linecap="round" fill="none"/>
<path d="{LEAF_BLADE}" fill="url(#f-leaf)"/>
<path d="{LEAF_MIDRIB}" fill="none" stroke="{LEAF_VEIN}" stroke-opacity="0.45"
@@ -441,7 +469,7 @@ def _drifting_leaves(seed: int) -> str:
out.append(
f' <g transform="translate({cx} {cy}) rotate({rot}) '
f'scale({scale}) translate(-32 -32)" opacity="{opacity:.2f}">'
f'<path d="{LEAF_BLADE}" fill="{RUNE_GOLD}"/></g>'
f'<path d="{LEAF_BLADE}" fill="{MALLORN}"/></g>'
)
return "\n".join(out)
@@ -481,8 +509,8 @@ def build_banner() -> str:
<stop offset="1" stop-color="{NIGHT_LOW}"/>
</linearGradient>
<radialGradient id="b-glow" cx="0.5" cy="0.54" r="0.5">
<stop offset="0" stop-color="{GOLD}" stop-opacity="0.22"/>
<stop offset="1" stop-color="{GOLD}" stop-opacity="0"/>
<stop offset="0" stop-color="{MALLORN}" stop-opacity="0.22"/>
<stop offset="1" stop-color="{MALLORN}" stop-opacity="0"/>
</radialGradient>
<!-- Cool light sitting just above the ridge line, so the far mountains
separate from the near ones instead of merging into one dark mass. -->
@@ -506,7 +534,7 @@ def build_banner() -> str:
{_mountains(width, 366, 3, 150, "#1C2836")}
{_mountains(width, 392, 8, 112, "#111A25")}
{_mountains(width, 416, 21, 74, "#080D13")}
<rect y="{height - 5:.0f}" width="{width:.0f}" height="5" fill="{GOLD}" opacity="0.55"/>
<rect y="{height - 5:.0f}" width="{width:.0f}" height="5" fill="{MALLORN}" opacity="0.55"/>
<!-- Lockup. Colours are fixed rather than themed: the banner carries its own
night sky, so it must not follow the reader's colour scheme. -->
@@ -514,7 +542,7 @@ def build_banner() -> str:
{mark_body("b")}
</g>
<g transform="translate({lockup_x + mark_size + gap - run.x0:.2f} {baseline_y:.2f})">
<style>.base {{ fill: {PARCHMENT}; }} .accent {{ fill: {RUNE_GOLD}; }}</style>
<style>.base {{ fill: {PARCHMENT}; }} .accent {{ fill: {MALLORN}; }}</style>
{run.paths(ACCENT_GLYPHS, indent=" ")}
</g>
<g transform="translate({tag_x:.2f} {tag_y:.2f})">