diff --git a/game/scripts/interface/color_picker.rpy b/game/scripts/interface/color_picker.rpy index 9977e8aa..4ff9cad0 100644 --- a/game/scripts/interface/color_picker.rpy +++ b/game/scripts/interface/color_picker.rpy @@ -19,7 +19,7 @@ screen color_picker(color, alpha, title, pos_xy, color_default): $ gradient_map = SVGradientButton( color_picker_clicked, Fixed( - Color( tuple( x * 255 for x in colorsys.hsv_to_rgb(1 - hue, 1, 1) ) ), + Color(hsv=(1-hue, 1, 1)), Frame("interface/color_picker/saturation_value_gradient.webp") ), xysize=(255, 255), @@ -305,7 +305,7 @@ init -1 python: def color_picker_update_hsva(): scope = renpy.get_screen("color_picker").scope (r, g, b, a) = scope["rgba"] - (h, s, v) = colorsys.rgb_to_hsv(r / 255.0, g / 255.0, b / 255.0) + (h, s, v) = Color((r, g, b)).hsv scope["hue"] = 1 - h scope["sat"] = s scope["val"] = v @@ -313,7 +313,7 @@ init -1 python: def color_picker_update_rgba(): scope = renpy.get_screen("color_picker").scope - (r, g, b) = colorsys.hsv_to_rgb(1 - scope["hue"], scope["sat"], scope["val"]) + (r, g, b) = Color(hsv=(1 - scope["hue"], scope["sat"], scope["val"])).rgb r = int(r * 255) g = int(g * 255) b = int(b * 255) diff --git a/game/scripts/utility/common_functions.rpy b/game/scripts/utility/common_functions.rpy index f9707b23..53e55a2d 100644 --- a/game/scripts/utility/common_functions.rpy +++ b/game/scripts/utility/common_functions.rpy @@ -5,7 +5,6 @@ init python early: import math import random import pygame - import colorsys import fnmatch import posixpath import re