omega0verride/PyQt-ColorPicker

Central Colour disappear when brightness set to 0

tobi08151405 opened this issue · 1 comments

The central Colour Blob disappears when the brightness slider is dragged fully to the left.
I discovered, that the cause is that the brightness not only modifies the RGB-Value but also effects the alpha channel.

I would suggest that the alpha channel is defaulted to 1.

Added a boolean hange_alpha_channel on initalization of colorpickerWheel class
self.colorpickerWidget = colorpickerWheel(colorpickerSize=self.width, startupcolor=self.startup_color, mouseDot_size=30, mouseDotDistance_changer=2, centralColorWidget_size=55, centralColorWidget_radius=20, centerColorWidget_isCircle=True, change_alpha_channel=False, sliders=self.sliders)

If you set it True it changes the alpha channel of the central color.
Else alpha is set as 255.

if self.change_alpha_channel: rgba_color = (str(color)).replace(")", ", ") + str(self.value) + ")" else: rgba_color = (str(color)).replace(")", ", ") + str(255) + ")"