From 2e8424a4af0b216a38f1b73b38f2df86bdc68512 Mon Sep 17 00:00:00 2001 From: Brian Fertig Date: Sat, 11 Jul 2026 18:47:42 -0600 Subject: [PATCH] chore(peggle): update peg color palette to match spritesheet Update PEG_TINT and PEG_LIT color constants to match the dominant fills of the peg frames in peggle-sprites.png, ensuring procedural bricks and fallback pegs stay in scheme. Document that these constants should be re-sampled if the spritesheet is repainted. --- assets/gamedata/peggle/sprites.md | 5 ++++- src/games/peggle/PeggleGame.js | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/assets/gamedata/peggle/sprites.md b/assets/gamedata/peggle/sprites.md index 04ce971..f37cd66 100644 --- a/assets/gamedata/peggle/sprites.md +++ b/assets/gamedata/peggle/sprites.md @@ -109,7 +109,10 @@ fever sweep. Bricks are **procedurally drawn** (not in the sprite sheet): color fill with a dark outer stroke and a light inner inset stroke, using the same palette as -the pegs. The reserved sheet frames 9–15 could skin them later if wanted. +the pegs. The palette (`PEG_TINT`/`PEG_LIT` in `src/games/peggle/PeggleGame.js`) +is sampled from the dominant fill of each peg frame in `peggle-sprites.png` — +**if you repaint the peg colors, re-sample those two constants** so bricks +stay in scheme. The reserved sheet frames 9–15 could skin them later if wanted. ## Not covered by the sheet diff --git a/src/games/peggle/PeggleGame.js b/src/games/peggle/PeggleGame.js index 2f138e6..711853a 100644 --- a/src/games/peggle/PeggleGame.js +++ b/src/games/peggle/PeggleGame.js @@ -20,8 +20,11 @@ const BOARD_H = TUNING.BOARD_H; const SIM_STEP = 1 / 60; const FEVER_TIMESCALE = 0.3; -const PEG_TINT = { blue: 0x4d8dee, orange: 0xff8a1e, green: 0x3ed164, purple: 0xc05df0 }; -const PEG_LIT = { blue: 0x9cc4ff, orange: 0xffc266, green: 0x8df2a8, purple: 0xe3a8ff }; +// Palette sampled from the dominant fill of each frame in +// assets/images/peggle-sprites.png, so brick curves (and the procedural peg +// fallback) match the painted pegs. Re-sample if the sheet is repainted. +const PEG_TINT = { blue: 0x6050b0, orange: 0xb86030, green: 0x58c040, purple: 0xc850b8 }; +const PEG_LIT = { blue: 0x3000f8, orange: 0xe0a880, green: 0x50e020, purple: 0xf880f0 }; // Optional drop-in spritesheet (see assets/gamedata/peggle/sprites.md). When // assets/images/peggle-sprites.png exists it replaces the procedural circles;