Fix brightness in generic ColorChannelHandler (#4242)

Signed-off-by: Timotheos Constambeys <timo0190@gmail.com>
This commit is contained in:
Timotheos Constambeys
2024-05-22 18:08:34 +02:00
committed by GitHub
parent 873bb53cbc
commit 83bd5fff2e
@@ -65,7 +65,7 @@ public class ColorChannelHandler extends AbstractTransformingChannelHandler {
state = newState;
return hsbToString(newState);
} else if (command instanceof PercentType percentCommand && state instanceof HSBType colorState) {
HSBType newState = new HSBType(colorState.getBrightness(), colorState.getSaturation(), percentCommand);
HSBType newState = new HSBType(colorState.getHue(), colorState.getSaturation(), percentCommand);
state = newState;
return hsbToString(newState);
}