What does accent-pages do?
One page, two versions: plain (two quiet colours) and accent (the same page plus one colour from the far side of
the colour wheel, used only on the hero subject). The script is scripts/accent.py in this skill's folder (call it S).
Run python3 S/scripts/accent.py --help for every command and flag.
Before the first render
- Needs Python 3.9+,
python3 -m pip install requests pillow, andOPENAI_API_KEYin the shell or in a.envfile in the project folder. Never print, echo or commit the key. - Each render is one paid OpenAI image call. A finished pair is usually 3 to 4 calls (2 accent tries, 1 plain, maybe 1 fix). Tell the user that before the first render.
Workflow
- Brief. Ask the user what the brand sells and who it is for, one question at a time. Invent the rest.
- Fill
page.json.accent.py init <folder>writes an example (Copperline, a hair salon). Replace every field:subject: one striking object or person, big enough to break the frame. The accent lives on it and nowhere else.accent_on/plain_as: the subject with the accent, and the same subject in a quiet neutral (silver, white, grey).headline: 1 to 3 short words, tied to the subject.type: typeface style and colour (the ink colour).ui: a real site's nav, button and 1 to 2 small captions, so it reads as a landing page, not a poster.palette:field(the background),ink(type),accent. Two quiet colours, one loud one.ref(optional, strongly recommended): path to a landing-page screenshot the user likes, e.g. from Pinterest. The render borrows its layout and craft, not its brand or colours. Without it, layouts come out plainer.
- Check.
accent.py check <folder>must printpalette OK. It fails when the accent sits too close on the wheel to the quiet colours, the field is too saturated, or the ink is hard to read. Fix the hex, check again. - Render the accent page.
accent.py render <folder>makes 2 tries inout/. Open each one and check:- every word, letter by letter: image models drop or merge letters in big headlines;
- the accent appears only on the subject;
- it reads as a website: nav, button, small text.
Fix one problem per call:
accent.py fix <folder> <render> "<the one change>".
- Make the plain page.
accent.py plain <folder> <chosen accent render>. It edits that render, so layout and words stay put. Compare the two: same words, same layout, the accent gone. If it drifted, runplainagain. - Pair.
accent.py pair <folder> <plain> <accent>savesout/pair.pngwith swatches. Use the hexes it prints for anything downstream: they come from the render, not the plan.
Taste rules
- The accent goes on the hero subject only: hair, a can, a lettuce, a sofa. Never on buttons, nav or small text.
- Quiet colours carry the page: a pale field and a dark ink. Name every colour with a plain word (Silver, Navy, Copper).
- If the plain version already looks exciting, the quiet colours are too loud. If the accent version does not jump, the accent is too close to the field on the wheel or too dull.
- Show the result as plain first, then accent: the change is the point.