ddb65403c2
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>
25 lines
1.3 KiB
XML
25 lines
1.3 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="384" viewBox="0 0 256 384">
|
||
<rect x="1" y="1" width="254" height="382" rx="16" ry="16"
|
||
fill="#1a1a1a" stroke="#e8e8e8" stroke-width="2"/>
|
||
|
||
<!-- Top-left rank in JetBrains-Mono-styled FiraMono (rank digits
|
||
and letters render correctly in FiraMono; only the suit glyphs
|
||
needed to escape to paths). -->
|
||
<text x="14" y="44" font-family="Fira Mono" font-size="36" font-weight="700"
|
||
fill="#e8e8e8">3</text>
|
||
|
||
<!-- Top-left small suit glyph at (14, 50), 20 × 20.
|
||
`suit_path_d` is authored in a 32-unit box, so scale 0.625
|
||
lands the visible glyph at 20 px. -->
|
||
<g transform="translate(14 50) scale(0.625)">
|
||
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#e8e8e8"/>
|
||
</g>
|
||
|
||
<!-- Bottom-right large suit glyph at (178, 286), 64 × 64.
|
||
Visible bottom-right at (242, 350), visible top-left at
|
||
(178, 286). Same upright orientation as the top-left small
|
||
glyph — no 180° rotation applied. -->
|
||
<g transform="translate(178 286) scale(2)">
|
||
<path d="M16,4 C 9,9 2,14 2,21 C 2,25 5,28 9,28 C 13,28 14,26 14,24 L 13,30 L 19,30 L 18,24 C 18,26 19,28 23,28 C 27,28 30,25 30,21 C 30,14 23,9 16,4 Z" fill="#e8e8e8"/>
|
||
</g>
|
||
</svg> |