Design: add the orange second accent from the UZURON palette and split the colour roles (orange marks, green acts) in both themes; soften the dark green and lift the dark cards toward the page background. Background options for the next review are in design/background-options-2026-10-13/. Page: replace the process block with an individual-approach section; drop the budget form field; rename the contact field to a preferred channel; add a submit confirmation dialog, studio links (mail, VK, RuStore), the First Step Radio card, portfolio filters by platform, stack, genre and status, a cookie bar and a removable hero ticker. Cards keep the mascot face; the member window gains the real photo and the city. Planet: fold the speed knobs into SPEED_TAU and SPEED_MIN with a hard stop below the threshold; the pill is the only hover target and the summary card is inert. Repo: remove .pen backups from the index, ignore backups and Python artefacts, drop generated pen-sync exports.
111 lines
3.5 KiB
Python
111 lines
3.5 KiB
Python
"""Render verification of the Pencil frames (MCP Export) — wave 2026-10-13.
|
|
|
|
Counts exact palette pixels in the exported PNGs, so the claim
|
|
"the mock carries the new palette and the orange carriers" is backed by
|
|
rendered pixels, not by variable declarations.
|
|
|
|
Run: python design/pen-sync/verify-render-2026-10-13.py
|
|
Exit: 0 = all expectations met, 1 = a check failed.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
from PIL import Image
|
|
|
|
OUT = Path(__file__).resolve().parent / "out" / "mcp-2026-10-13"
|
|
|
|
DARK = {
|
|
"#181109": "bg",
|
|
"#1F160D": "card",
|
|
"#261C11": "input-bg",
|
|
"#332719": "hairline",
|
|
"#22B46B": "brand (CTA fill)",
|
|
"#49CA85": "brand-deep (links/focus)",
|
|
"#D1911A": "accent (orange)",
|
|
"#E7A223": "accent-deep (orange text)",
|
|
"#F8F2E7": "text-1",
|
|
"#A28B6E": "line-strong",
|
|
}
|
|
LIGHT = {
|
|
"#F5EEE2": "bg",
|
|
"#FFFCF7": "card",
|
|
"#E6DCCE": "hairline",
|
|
"#00CC66": "brand (CTA fill)",
|
|
"#007A3F": "brand-deep",
|
|
"#FFA400": "accent (orange)",
|
|
"#9C5800": "accent-deep (orange text)",
|
|
"#211E18": "text-1",
|
|
"#847863": "line-strong",
|
|
}
|
|
# colours that must have ZERO pixels in the render (retired values)
|
|
RETIRED_DARK = {
|
|
"#00CC66": "old brand fill (S100) — must not render in dark",
|
|
"#4FD98A": "old brand-deep in dark",
|
|
"#251A0F": "old dark card",
|
|
"#2F2113": "old dark input-bg",
|
|
"#3C2C1C": "old dark hairline",
|
|
}
|
|
RETIRED_LIGHT = {
|
|
"#3FA9F5": "old blue accent — the landing now uses orange",
|
|
"#1A6FC4": "old blue accent-deep",
|
|
}
|
|
|
|
|
|
def hex_to_rgb(h: str) -> tuple[int, int, int]:
|
|
h = h.lstrip("#")
|
|
return int(h[0:2], 16), int(h[2:4], 16), int(h[4:6], 16)
|
|
|
|
|
|
def counts(png: Path, palette: dict[str, str]) -> tuple[dict[str, int], tuple[int, int]]:
|
|
im = Image.open(png).convert("RGB")
|
|
width, height = im.size
|
|
pixels = list(im.getdata())
|
|
found: dict[str, int] = {}
|
|
for hx, label in palette.items():
|
|
rgb = hex_to_rgb(hx)
|
|
found[label] = pixels.count(rgb)
|
|
print(f" {hx} {label:<26} {found[label]:>8}")
|
|
return found, (width, height)
|
|
|
|
|
|
def main() -> int:
|
|
failures: list[str] = []
|
|
|
|
for png, palette, retired, label in (
|
|
(OUT / "i5mIu.png", DARK, RETIRED_DARK, "dark frame i5mIu"),
|
|
(OUT / "W0IwN.png", LIGHT, RETIRED_LIGHT, "light frame W0IwN"),
|
|
):
|
|
if not png.exists():
|
|
print(f"!! missing render: {png}")
|
|
failures.append(f"missing {png.name}")
|
|
continue
|
|
print(f"== {label} ({png.name})")
|
|
found, size = counts(png, palette)
|
|
print(f" render size {size[0]}x{size[1]}")
|
|
for key in ("bg", "card", "input-bg", "brand (CTA fill)", "brand-deep (links/focus)",
|
|
"accent (orange)", "accent-deep (orange text)"):
|
|
if key in found and found[key] == 0:
|
|
failures.append(f"{png.name}: no pixels of {key}")
|
|
print(" retired colours that must be absent:")
|
|
for hx, why in retired.items():
|
|
rgb = hex_to_rgb(hx)
|
|
n = list(Image.open(png).convert("RGB").getdata()).count(rgb)
|
|
print(f" {hx} {why:<45} {n:>8}")
|
|
if n:
|
|
failures.append(f"{png.name}: {hx} still renders ({why})")
|
|
print()
|
|
|
|
if failures:
|
|
print("FAIL:")
|
|
for f in failures:
|
|
print(" -", f)
|
|
return 1
|
|
print("PASS: both renders carry the wave palette; no retired colour renders.")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|