fix(ui): normalize infill alpha to 0-255 when building infill nodes

The browser/UI uses float 0-1 for alpha, while backend uses 0-255. We need to normalize the value when building the infill nodes for outpaint.
This commit is contained in:
psychedelicious
2024-10-23 21:25:25 +10:00
parent 3583d03b70
commit 3947d4a165

View File

@@ -106,10 +106,12 @@ export const getInfill = (
}
if (infillMethod === 'color') {
const { a, ...rgb } = infillColorValue;
const color = { ...rgb, a: Math.round(a * 255) };
return g.addNode({
id: 'infill_rgba',
type: 'infill_rgba',
color: infillColorValue,
color,
});
}