Remove dependency

This commit is contained in:
Gouvernathor 2023-11-17 03:52:39 +01:00
parent 6b2766e668
commit 3fef941366
2 changed files with 3 additions and 4 deletions

View File

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

View File

@ -5,7 +5,6 @@ init python early:
import math
import random
import pygame
import colorsys
import fnmatch
import posixpath
import re