// Flower placeholder — stylized SVG "sketch" for product cards and hero imagery. // Not realistic; monochrome-ish and overlays a striped ph texture. function FlowerArt({ hue = '#d9a78a', bg = '#f2dfcd', seed = 1, label, aspect = '1/1', style = {} }){ // Deterministic layout using seed const petals = 6 + (seed % 3); const cx = 100, cy = 104; const r1 = 44; const stemLen = 62 + (seed * 7) % 20; const darker = shade(hue, -0.25); const lighter = shade(hue, 0.25); const leafHue = '#6f8b66'; const petalEls = Array.from({length: petals}).map((_, i) => { const ang = (Math.PI * 2 * i) / petals + seed * 0.35; const rx = 22, ry = 34; const px = cx + Math.cos(ang) * 14; const py = cy + Math.sin(ang) * 14; return ( ); }); return (
{/* stem */} {/* leaf */} {/* petals */} {petalEls} {/* center */} {label ?
{label}
: null}
); } function shade(hex, amt){ // amt -1..1. Simple HSL-ish mix towards black/white via channel blending. const c = hex.replace('#',''); const n = parseInt(c.length===3 ? c.split('').map(x=>x+x).join('') : c, 16); let r = (n>>16)&255, g=(n>>8)&255, b=n&255; if(amt >= 0){ r = Math.round(r + (255-r)*amt); g = Math.round(g + (255-g)*amt); b = Math.round(b + (255-b)*amt); } else { const k = 1+amt; r = Math.round(r*k); g = Math.round(g*k); b = Math.round(b*k); } return '#'+[r,g,b].map(v=>v.toString(16).padStart(2,'0')).join(''); } // Simple striped placeholder for "photo not yet taken" cases function PhotoPh({label='photo', aspect='4/5', tone='#ecdcc4'}){ return (
{label}
); } window.FlowerArt = FlowerArt; window.PhotoPh = PhotoPh; window.shade = shade;