← back to Dw Pairs Well
Design Coordinate v5: graceful fallback for sources without Gemini palette
a3a416a1426ca10328d41508279cd066575f4754 · 2026-05-13 09:34:02 -0700 · Steve Abrams
Test results — 6/6 source SKUs return 24 coordinates (was 5/6).
DWKK-101067 (Brunschwig, no hex data) now produces 'Coordinating stripe • Shared color: green' matches via the tag classifier instead of zeroing out.
Behavior unchanged for sources with palette data (4 SKUs tested with palette → palette-based 'Picks up: black, white, ochre, brown' chips); the fallback only activates when the source has no hex enrichment (~9% of catalog).
Files touched
Diff
commit a3a416a1426ca10328d41508279cd066575f4754
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed May 13 09:34:02 2026 -0700
Design Coordinate v5: graceful fallback for sources without Gemini palette
Test results — 6/6 source SKUs return 24 coordinates (was 5/6).
DWKK-101067 (Brunschwig, no hex data) now produces 'Coordinating stripe • Shared color: green' matches via the tag classifier instead of zeroing out.
Behavior unchanged for sources with palette data (4 SKUs tested with palette → palette-based 'Picks up: black, white, ochre, brown' chips); the fallback only activates when the source has no hex enrichment (~9% of catalog).
---
server.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/server.js b/server.js
index e7d8b87..721a3b4 100644
--- a/server.js
+++ b/server.js
@@ -244,9 +244,13 @@ function pickPairs(source, candidates, k = 24) {
});
// HARD FILTER per Steve's rule: every coordinate MUST use colors from the source palette.
- // Require palette overlap score ≥ 1 (at least one color within ΔE ≤ 35) and at least one
- // picked-up color name. Otherwise the card is "a stripe" but not a coordinating stripe.
- const eligible = scored.filter(x => x._overlapScore >= 1 && x._pickedUp.length >= 1);
+ // If the source has hex enrichment, require palette overlap ≥ 1 (ΔE ≤ 35 to any source color).
+ // If the source has NO hex data (~9% of catalog — Phillipe Romano / Brunschwig / Thibaut etc.
+ // not yet Gemini-enriched), fall back to tag-based color matching so the feature still works.
+ const hasSourcePalette = sourcePalette.length > 0;
+ const eligible = hasSourcePalette
+ ? scored.filter(x => x._overlapScore >= 1 && x._pickedUp.length >= 1)
+ : scored.filter(x => x._score >= 5); // motif (+6) is already in; require some tag overlap too
eligible.sort((a, b) => b._score - a._score);
← d2062b0 Design Coordinate v4: density slider 3-12 (default 8), 24 ca
·
back to Dw Pairs Well
·
v6: all 7 paint brands + paste-in snippet for Shopify theme 1d2c3f3 →