feat(engine): revert to traditional 2-colour deck with saturated red + near-white
Per player feedback after the brief 4-colour-deck experiment: "can we make the card suit colors the same as a regular solitaire game would." Reverts the 4-colour split (`62b61cc`) and bumps both 2-colour hues to read more like a real Microsoft-Solitaire-on-dark-mode deck. ### Constants - `RED_SUIT_COLOUR`: `#fb9fb1` (Terminal pink, then briefly hearts-only) → `#e35353` (saturated red). More chromatic, less pastel; reads as "the red suit" rather than "a Terminal- themed pink." Visually distinct from `ACCENT_PRIMARY` `#a54242` (the brick-red CTA accent) so chrome and suit don't collapse to the same hue. - `BLACK_SUIT_COLOUR`: `#d0d0d0` (matched `TEXT_PRIMARY`) → `#e8e8e8` (near-white). Bumped slightly brighter so it reads as a chromatic-neutral counterpart to the new saturated red, not as "the same gray as body text." `TEXT_PRIMARY_HC` (`#f5f5f5`) is still brighter for the high-contrast boost path. - `RED_SUIT_COLOUR_HC`: `#ff8aa0` (pinkish boost matching the v0.21.0 pink default) → `#ff6868` (brighter saturated red). Now reads as "more chromatic" than the new default red, not "less saturated." - `DIAMOND_SUIT_COLOUR` and `CLUB_SUIT_COLOUR` deleted — the 4-colour split is gone, hearts/diamonds re-pair under `RED_SUIT_COLOUR` and clubs/spades under `BLACK_SUIT_COLOUR`. ### `card_face_svg.rs` - Module-level constants collapse from four (`SUIT_HEART` / `SUIT_DIAMOND` / `SUIT_CLUB` / `SUIT_SPADE`) back to two (`SUIT_RED` / `SUIT_DARK`) at the new saturated-red / near-white values. - `suit_paint()` reverts to the 2-colour pairing: hearts filled-red, diamonds outlined-red, spades filled-near-white, clubs outlined-near-white. Filled-vs-outlined glyph differentiation stays the always-on CBM fallback. ### `card_plugin.rs` - `text_colour()` reverts to a `card.suit.is_red()` bifurcation. Comment block updated to reflect the new truth table: red suits → saturated red (or CBM lime / HC brighter red); dark suits → near-white (or HC brighter near-white). ### Tests Test block restructured back to the pre-4-colour shape: two red/black pairing tests instead of one 4-colour distinctness test. CBM/HC compose tests retuned to the 2-colour world (red suits compose, dark suits compose; no separate diamonds-immune or clubs-immune cases). 1191 passing / 0 failing — net 0 from the prior commit (3 tests removed: the 4-colour distinctness test + the diamonds/clubs-immune test; 2 tests added back: the red-pairing + dark-pairing tests; existing tests amended to new colour assumptions). ### `card_face_svg_pin` All 52 face hashes drift (every suit's colour shifted); 5 back hashes unchanged. Surgical rebaseline. ### `design-system.md` §Suit Colors retitled "Two-color traditional pairing", table updated with the new hex values, CBM section text simplified back to red→lime swap on both red suits. Workspace clippy clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -30,18 +30,14 @@ pub const TARGET: UVec2 = UVec2::new(256, 384);
|
||||
|
||||
const BG_FACE: &str = "#1a1a1a"; // BG_ELEVATED — face background
|
||||
|
||||
// Four-colour deck: each suit picks up its own base16-eighties
|
||||
// accent so a player scanning the table can distinguish the suit
|
||||
// by hue alone. Faster recognition than the 2-colour traditional
|
||||
// red/black scheme; common in poker-room decks and online card
|
||||
// games. The outlined-glyph differentiation (♦ ♣ outlined, ♥ ♠
|
||||
// filled) is preserved on top of the colour split as the
|
||||
// always-on colour-blind fallback per `design-system.md`
|
||||
// §Accessibility.
|
||||
const SUIT_HEART: &str = "#fb9fb1"; // pink (base08 / RED_SUIT_COLOUR)
|
||||
const SUIT_DIAMOND: &str = "#ddb26f"; // gold (base09 / STATE_WARNING)
|
||||
const SUIT_CLUB: &str = "#acc267"; // lime (base0A / STATE_SUCCESS)
|
||||
const SUIT_SPADE: &str = "#d0d0d0"; // foreground gray (base05 / TEXT_PRIMARY)
|
||||
// 2-colour traditional pairing — hearts + diamonds share a
|
||||
// saturated red, clubs + spades share a near-white. Mirrors the
|
||||
// "Microsoft Solitaire on dark mode" feel of a real card deck.
|
||||
// Brief 4-colour-deck experiment between v0.21.0 and this commit
|
||||
// reverted; the always-on filled-vs-outlined glyph differentiation
|
||||
// (♦ ♣ outlined, ♥ ♠ filled) carries the always-on CBM fallback.
|
||||
const SUIT_RED: &str = "#e35353"; // matches `RED_SUIT_COLOUR`
|
||||
const SUIT_DARK: &str = "#e8e8e8"; // matches `BLACK_SUIT_COLOUR`
|
||||
|
||||
const BACK_BG: &str = "#151515";
|
||||
const BACK_SCANLINE: &str = "#1a1a1a";
|
||||
@@ -156,10 +152,10 @@ enum GlyphPaint {
|
||||
|
||||
fn suit_paint(suit: Suit) -> (&'static str, GlyphPaint) {
|
||||
match suit {
|
||||
Suit::Hearts => (SUIT_HEART, GlyphPaint::Filled),
|
||||
Suit::Diamonds => (SUIT_DIAMOND, GlyphPaint::Outlined),
|
||||
Suit::Spades => (SUIT_SPADE, GlyphPaint::Filled),
|
||||
Suit::Clubs => (SUIT_CLUB, GlyphPaint::Outlined),
|
||||
Suit::Hearts => (SUIT_RED, GlyphPaint::Filled),
|
||||
Suit::Diamonds => (SUIT_RED, GlyphPaint::Outlined),
|
||||
Suit::Spades => (SUIT_DARK, GlyphPaint::Filled),
|
||||
Suit::Clubs => (SUIT_DARK, GlyphPaint::Outlined),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user