mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Color picker fixes
This commit is contained in:
parent
0489a156a3
commit
9299357345
2 changed files with 6 additions and 3 deletions
|
@ -205,7 +205,10 @@ class ColorShop(StateData.StateData):
|
|||
if not (0.0 <= x <= 1.0 and 0.0 <= y <= 1.0):
|
||||
return Task.cont
|
||||
|
||||
rgb = colorsys.hsv_to_rgb(self.hueSlider['value'], self.calcRelative(x, 0.0, 1.0, 0.36, 0.7), self.calcRelative(y, 0.0, 1.0, 0.5, 0.8)) + (1,)
|
||||
x = self.calcRelative(x, 0.0, 1.0, ToontownGlobals.COLOR_SATURATION_MIN, ToontownGlobals.COLOR_SATURATION_MAX)
|
||||
y = self.calcRelative(y, 0.0, 1.0, ToontownGlobals.COLOR_VALUE_MIN, ToontownGlobals.COLOR_VALUE_MAX)
|
||||
rgb = colorsys.hsv_to_rgb(self.hueSlider['value'], x, y) + (1,)
|
||||
rgb = tuple([float('%.2f' % x) for x in rgb])
|
||||
|
||||
if self.partChoice in (0, 1):
|
||||
self.dna.headColor = rgb
|
||||
|
|
|
@ -1687,7 +1687,7 @@ TV_NOT_OWNER = 0
|
|||
TV_INVALID_VIDEO = 1
|
||||
TV_OK = 2
|
||||
|
||||
COLOR_SATURATION_MIN = 0.36
|
||||
COLOR_SATURATION_MIN = 0.5
|
||||
COLOR_SATURATION_MAX = 0.8
|
||||
COLOR_VALUE_MIN = 0.5
|
||||
COLOR_VALUE_MAX = 0.9
|
||||
COLOR_VALUE_MAX = 0.8
|
Loading…
Reference in a new issue