fix(ui): normalize alpha value to 0-1 when picking color on canvas

This commit is contained in:
psychedelicious
2025-04-08 07:46:39 +10:00
parent b75d1b2473
commit e5a0010a72

View File

@@ -407,8 +407,7 @@ export class CanvasColorPickerToolModule extends CanvasModuleBase {
onStagePointerUp = (_e: KonvaEventObject<PointerEvent>) => {
const color = this.$colorUnderCursor.get();
const settings = this.manager.stateApi.getSettings();
this.manager.stateApi.setColor({ ...settings.color, ...color });
this.manager.stateApi.setColor({ ...color, a: color.a / 255 });
};
onStagePointerMove = (_e: KonvaEventObject<PointerEvent>) => {