[object Object]

← back to Wallco Ai

gen-luxe --color-family=<gated family> targets ground colorway so variant runs get guaranteed spread (navy+blush+sage) instead of random clustering

cc6dafb6843c5b4e7111cff558cd364f70d204e9 · 2026-05-31 19:56:05 -0700 · Steve

Files touched

Diff

commit cc6dafb6843c5b4e7111cff558cd364f70d204e9
Author: Steve <steve@designerwallcoverings.com>
Date:   Sun May 31 19:56:05 2026 -0700

    gen-luxe --color-family=<gated family> targets ground colorway so variant runs get guaranteed spread (navy+blush+sage) instead of random clustering
---
 scripts/gen-luxe.js | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/scripts/gen-luxe.js b/scripts/gen-luxe.js
index 058d513..65ea3d6 100644
--- a/scripts/gen-luxe.js
+++ b/scripts/gen-luxe.js
@@ -26,6 +26,9 @@ const { gateSubjectPresence, extractSubjectsFromPrompt } = require('../lib/subje
 const SRC_ID = parseInt(process.argv[2], 10);
 const MOTIF = process.argv[3];
 const TEXTURE_CAT = (process.argv.find(a => a.startsWith('--texture-cat=')) || '').split('=')[1] || '';
+// --color-family=<Blue|Brown|Green|...> targets the ground COLORWAY so variant
+// runs can guarantee a spread (navy + blush + sage) instead of random clustering.
+const COLOR_FAMILY = (process.argv.find(a => a.startsWith('--color-family=')) || '').split('=')[1] || '';
 // --variant=<A|B|C|D|E> forces a specific heritage-house aesthetic.
 const VARIANT = ((process.argv.find(a => a.startsWith('--variant=')) || '').split('=')[1] || '').toUpperCase();
 // --curator-mode lands variants as is_published=FALSE without touching
@@ -132,12 +135,23 @@ const MATERIAL_CATS = new Set([
   'sisal', 'abaca', 'seagrass', 'jute', 'hemp', 'arrowroot', 'paperweave',
   'bamboo', 'reed', 'natural',
 ]);
-function pickTextureBrief(category) {
+// Allowed color families (gate --color-family so it can't be interpolated raw).
+const COLOR_FAMILIES = new Set(['beige','brown','grey','gray','blue','green',
+  'gold','white','red','pink','yellow','turquoise','black','purple','orange',
+  'multi','metallic','coral']);
+function pickTextureBrief(category, colorFamily) {
   let cat = (category || '').toLowerCase().trim();
   if (cat && !MATERIAL_CATS.has(cat)) {
     console.warn(`[gen-luxe] unknown --texture-cat="${cat}" — using default natural-texture pool`);
     cat = '';
   }
+  let fam = (colorFamily || '').toLowerCase().trim();
+  if (fam && !COLOR_FAMILIES.has(fam)) {
+    console.warn(`[gen-luxe] unknown --color-family="${fam}" — ignoring color filter`);
+    fam = '';
+  }
+  if (fam === 'gray') fam = 'grey';
+  const colorWhere = fam ? `AND c.color_family ILIKE '${fam}'` : '';
   const pfx = SKU_PREFIX[cat] || '';
   const where = cat
     ? `AND (p.title ~* '\\m(${cat})\\M'${pfx ? ` OR p.sku ~* '^(${pfx})[-_]'` : ''})`
@@ -186,6 +200,7 @@ function pickTextureBrief(category) {
       AND p.image_url IS NOT NULL
       AND c.dominant_hex IS NOT NULL
       ${where}
+      ${colorWhere}
     ORDER BY random() LIMIT 1`;
   try {
     const out = psql(sql);
@@ -206,7 +221,7 @@ function pickTextureBrief(category) {
   console.log(`[gen-luxe] src #${SRC_ID} · category=${d.category}`);
   console.log(`[gen-luxe] motif: ${MOTIF}`);
 
-  const textureBrief = pickTextureBrief(TEXTURE_CAT);
+  const textureBrief = pickTextureBrief(TEXTURE_CAT, COLOR_FAMILY);
   if (textureBrief) console.log(`[gen-luxe] ground texture: ${textureBrief}`);
   else              console.log(`[gen-luxe] ground texture: generic (PG pick returned nothing)`);
 

← 5203dd4 stoned-animals title-drift fix — re-title 303 designs with a  ·  back to Wallco Ai  ·  admin: rescue-curator — per-species drunk-animals review w/ 021e9d8 →