Fix brightness in generic ColorChannelHandler (#4242)

Signed-off-by: Timotheos Constambeys <timo0190@gmail.com>
This commit is contained in:
Timotheos Constambeys 2024-05-22 19:08:34 +03:00 committed by GitHub
parent 873bb53cbc
commit 83bd5fff2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}