Rainbow writing worksheets
Each page: a giant hollow capital, numbered dotted strokes showing how to
form it (in standard manuscript order), a "Say it:" cue the child speaks
while writing, a six-band rainbow with a cloud to color one band per pass,
and a picture + "A is for Apple" caption. Name line and "N of M" page
numbers.
Run it
python <SKILL_DIR>/scripts/make_rainbow.py --letters ABCDE --out rainbow-writing.pdf
--letters defaults to A-Z. --title replaces the heading on every page
(by default it is "Rainbow writing" in each page's language).
Needs reportlab fonttools numpy pillow opencv-python scikit-image
(and pypdfium2 to render pages for review). All fonts are bundled.
The script prints one line per page. Anything but ok is a layout problem —
fix it before handing the file over.
Review before handing it over
The generator checks every page for the problems found so far; that is a
floor, not the review. Do both:
python <SKILL_DIR>/scripts/verify.py <letters>: for every stroke, how
far the dotted path sits from the middle of the stroke, whether each END
sits on the middle of the cut it ends on (not in a corner), any point
outside the letter, and any place the path doubles back. Run it from a
scratch folder: it writes overlay sheets (verify_sheet_*.png). Every
flag is either listed with its reason in scripts/verify_expected.txt or
printed as NEW (and the script exits 1). It passes only with 0 NEW.
Never add a flag to that list because a similar letter has one: Ž's
caron "looked like V's tip" and was a real bug. After changing shared
code, run it on every letter, A-Z and the marked ones.
When the review finds a bug the checker missed, add a check that fails
on the old code before fixing it (ADDING-LETTERS.md, Step 3).
- Render every page and look at each one as if you'd never seen it —
zoomed in on anything that looks slightly off. If a render looks a bit
wrong, it is wrong: find out why rather than explaining it away.
- Render at 3x and crop every mark and every stroke end. Ask of each
end "is this the middle of the cut?" A corner ending looks fine at page
size; the tilde bug only showed zoomed in.
Every page is in its letter's language (PAGE_TEXT in make_rainbow.py:
title, Name, instructions, Say it, caption, page number). The non-English
phrases are first drafts: say so when handing pages over.
What the pages must get right
- Nothing scary for young kids — no jack-o-lanterns, zipper-mouth faces,
skeletons, X-rays. X is a hand-drawn xylophone for that reason.
- Pictures are plain single-line drawings (OpenMoji black). Never stroke
a filled emoji's outline — it doubles every line.
- Dotted guides ride the middle of each stroke, measured off the real
glyph (
scripts/letterform.py), never modelled as ellipses. Where two
strokes run along the same bar (B's waist) each gets its own lane.
- Stroke order is standard manuscript, matching the "Say it" cue.
- Strokes that end in a flat cut (S, G, J) start/finish on the middle of
the cut, square to it. Near a flat end the ridge forks toward the
corners, so the traced path drifts; the last stretch is rebuilt from the
centre of the ink on each row back from the cut (
ridge_route(..., head/tail="face-down"/"face-up")).
- Corners stay corners. G goes up its right side and turns sharply
along the bar; don't let smoothing round it off.
- Arrowheads aim along the last ~10pt of their stroke, measured by
length. Aiming "a few points back" by count breaks on M, V, W, whose
zigzags are stored as only 3-5 corners — the arrows swung sideways.
- Badges have comfortable room: each slides along its own stroke until
clear of other badges, other strokes' dotted lines, and arrowheads. On a
closed loop (O, Q) the badge sits on the start point itself.
- Text is normal weight. The hollow letter uses PDF text render mode 1;
it is reset inside that same text object, or every later string on the
page comes out outlined.
- Letters share one cap height, except Q (tail below the baseline), W
(too wide), and letters with marks (Ñ, Ç, Ü, Å, Ž, É), which are shrunk only as far
as they must be.
- Marks are their own strokes, after the base letter: Ñ's tilde left to
right, Ç's hook from where it leaves the C, Ü's dots as numbered taps with
no arrow ("dot" strokes).
Changing things
- Keywords, pictures, and cues live in the
LETTERS table at the top of
make_rainbow.py. A picture is an OpenMoji codepoint, or the name of a
drawing function (like xylophone). Check a new picture renders as clean
line art and is friendly before using it; keep short-vowel words for
vowels (Apple, Egg, Umbrella).
- Stroke paths live in
strokes_for() in letterform.py, one branch per
letter. After changing one, run verify.py for that letter and look at the
overlay.
- To add a letter, follow
ADDING-LETTERS.md (in this folder): the
toolkit, letters with marks, how to read the checker, and the traps.
- Besides A-Z, the table has Ñ Ç Ü Å Ø Ž Ł É. They are not in the default
alphabet: pass them in
--letters. Letters not in the table are skipped,
and the script prints which.
- Poppins lacks many African letters (Ŋ, Ɛ, Ɔ, Ɓ, Ɗ...).
Glyph() refuses a
letter the font doesn't have; supporting one means changing the font,
which means re-checking every letter (see ADDING-LETTERS.md).
- On Windows set
PYTHONIOENCODING=utf-8, or printing Ñ crashes the script.
- Lowercase: a b c d e i l o t n are built (
--letters abc keeps them
lowercase), with top/dashed-middle/baseline guide lines and one shared
size. The rest are not built yet; see ADDING-LETTERS.md.
1---2name: rainbow-writing-worksheet3description: >4 Generate printable "rainbow writing" alphabet worksheets for young children:5 one giant hollow capital letter per 8.5x11 page with numbered dotted6 stroke-order guides, a rainbow the child colors one band of after each7 tracing pass, and a friendly line-art picture of something starting with8 that letter. Use when someone asks for rainbow writing, letter tracing9 pages, alphabet tracing, or letter-formation practice sheets for10 preschool/kindergarten, for the whole alphabet or a few letters.11metadata:12 source: https://skillmd.com/skills/jamespostsil/rainbow-writing-worksheet13---1415# Rainbow writing worksheets1617Each page: a giant hollow capital, numbered dotted strokes showing how to18form it (in standard manuscript order), a "Say it:" cue the child speaks19while writing, a six-band rainbow with a cloud to color one band per pass,20and a picture + "A is for Apple" caption. Name line and "N of M" page21numbers.2223## Run it2425```bash26python <SKILL_DIR>/scripts/make_rainbow.py --letters ABCDE --out rainbow-writing.pdf27```2829`--letters` defaults to A-Z. `--title` replaces the heading on every page30(by default it is "Rainbow writing" in each page's language).3132Needs `reportlab fonttools numpy pillow opencv-python scikit-image`33(and `pypdfium2` to render pages for review). All fonts are bundled.3435The script prints one line per page. Anything but `ok` is a layout problem —36fix it before handing the file over.3738## Review before handing it over3940The generator checks every page for the problems found so far; that is a41floor, not the review. Do both:42431. `python <SKILL_DIR>/scripts/verify.py <letters>`: for every stroke, how44 far the dotted path sits from the middle of the stroke, whether each END45 sits on the middle of the cut it ends on (not in a corner), any point46 outside the letter, and any place the path doubles back. Run it from a47 scratch folder: it writes overlay sheets (`verify_sheet_*.png`). Every48 flag is either listed with its reason in `scripts/verify_expected.txt` or49 printed as `NEW` (and the script exits 1). **It passes only with 0 NEW.**50 Never add a flag to that list because a similar letter has one: Ž's51 caron "looked like V's tip" and was a real bug. After changing shared52 code, run it on every letter, A-Z and the marked ones.53 When the review finds a bug the checker missed, add a check that fails54 on the old code before fixing it (ADDING-LETTERS.md, Step 3).552. Render every page and look at each one **as if you'd never seen it** —56 zoomed in on anything that looks slightly off. If a render looks a bit57 wrong, it is wrong: find out why rather than explaining it away.583. Render at 3x and crop **every mark and every stroke end**. Ask of each59 end "is this the middle of the cut?" A corner ending looks fine at page60 size; the tilde bug only showed zoomed in.6162Every page is in its letter's language (`PAGE_TEXT` in make_rainbow.py:63title, Name, instructions, Say it, caption, page number). The non-English64phrases are first drafts: say so when handing pages over.6566## What the pages must get right6768- **Nothing scary for young kids** — no jack-o-lanterns, zipper-mouth faces,69 skeletons, X-rays. X is a hand-drawn xylophone for that reason.70- **Pictures are plain single-line drawings** (OpenMoji black). Never stroke71 a filled emoji's outline — it doubles every line.72- **Dotted guides ride the middle of each stroke**, measured off the real73 glyph (`scripts/letterform.py`), never modelled as ellipses. Where two74 strokes run along the same bar (B's waist) each gets its own lane.75- **Stroke order is standard manuscript**, matching the "Say it" cue.76- **Strokes that end in a flat cut (S, G, J) start/finish on the middle of77 the cut, square to it.** Near a flat end the ridge forks toward the78 corners, so the traced path drifts; the last stretch is rebuilt from the79 centre of the ink on each row back from the cut (`ridge_route(...,80 head/tail="face-down"/"face-up")`).81- **Corners stay corners.** G goes up its right side and turns *sharply*82 along the bar; don't let smoothing round it off.83- **Arrowheads aim along the last ~10pt of their stroke, measured by84 length.** Aiming "a few points back" by count breaks on M, V, W, whose85 zigzags are stored as only 3-5 corners — the arrows swung sideways.86- **Badges have comfortable room**: each slides along its own stroke until87 clear of other badges, other strokes' dotted lines, and arrowheads. On a88 closed loop (O, Q) the badge sits on the start point itself.89- **Text is normal weight.** The hollow letter uses PDF text render mode 1;90 it is reset inside that same text object, or every later string on the91 page comes out outlined.92- **Letters share one cap height**, except Q (tail below the baseline), W93 (too wide), and letters with marks (Ñ, Ç, Ü, Å, Ž, É), which are shrunk only as far94 as they must be.95- **Marks are their own strokes, after the base letter**: Ñ's tilde left to96 right, Ç's hook from where it leaves the C, Ü's dots as numbered taps with97 no arrow ("dot" strokes).9899## Changing things100101- Keywords, pictures, and cues live in the `LETTERS` table at the top of102 `make_rainbow.py`. A picture is an OpenMoji codepoint, or the name of a103 drawing function (like `xylophone`). Check a new picture renders as clean104 line art and is friendly before using it; keep short-vowel words for105 vowels (Apple, Egg, Umbrella).106- Stroke paths live in `strokes_for()` in `letterform.py`, one branch per107 letter. After changing one, run `verify.py` for that letter and look at the108 overlay.109- **To add a letter, follow `ADDING-LETTERS.md`** (in this folder): the110 toolkit, letters with marks, how to read the checker, and the traps.111- Besides A-Z, the table has Ñ Ç Ü Å Ø Ž Ł É. They are not in the default112 alphabet: pass them in `--letters`. Letters not in the table are skipped,113 and the script prints which.114- Poppins lacks many African letters (Ŋ, Ɛ, Ɔ, Ɓ, Ɗ...). `Glyph()` refuses a115 letter the font doesn't have; supporting one means changing the font,116 which means re-checking every letter (see ADDING-LETTERS.md).117- On Windows set `PYTHONIOENCODING=utf-8`, or printing Ñ crashes the script.118- Lowercase: a b c d e i l o t n are built (`--letters abc` keeps them119 lowercase), with top/dashed-middle/baseline guide lines and one shared120 size. The rest are not built yet; see ADDING-LETTERS.md.