/** One validated input contract drives the shader and the alternate vector design. */ export function mapColorInput(color:string,brightness:number){ if(!/^#[0-9a-f]{6}$/i.test(color)||!Number.isFinite(brightness))throw new Error("Invalid color input"); return {color:color.toLowerCase(),intensity:Math.max(25,Math.min(100,brightness))/100}; }