molde 0.1.14__py3-none-any.whl → 0.1.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
molde/colors/color.py
CHANGED
@@ -130,7 +130,7 @@ class Color:
|
|
130
130
|
s = saturation / 100
|
131
131
|
|
132
132
|
c = v * s
|
133
|
-
h = hue / 60
|
133
|
+
h = hue % 360 / 60
|
134
134
|
x = c * (1 - abs(h % 2 - 1))
|
135
135
|
|
136
136
|
if 0 <= h < 1:
|
@@ -217,12 +217,10 @@ class Color:
|
|
217
217
|
return Color(self.r, self.g, self.b, self.a)
|
218
218
|
|
219
219
|
def apply_factor(self, factor: float | int) -> "Color":
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
return new_color
|
220
|
+
r = round(np.clip(self.r * factor, 0, 255))
|
221
|
+
g = round(np.clip(self.g * factor, 0, 255))
|
222
|
+
b = round(np.clip(self.b * factor, 0, 255))
|
223
|
+
return Color.from_rgba(r, g, b, self.a)
|
226
224
|
|
227
225
|
def with_brightness(self, brightness: int) -> "Color":
|
228
226
|
"""
|
@@ -265,9 +263,3 @@ class Color:
|
|
265
263
|
b if (b is not None) else self.b,
|
266
264
|
a if (a is not None) else self.a,
|
267
265
|
)
|
268
|
-
|
269
|
-
def __repr__(self):
|
270
|
-
return f"Color(r={self.r}, g={self.g}, b={self.b}, a={self.a})"
|
271
|
-
|
272
|
-
def __eq__(self, other: "Color"):
|
273
|
-
return self.r == other.r and self.g == other.g and self.b == other.b and self.a == other.a
|
@@ -7,7 +7,7 @@ molde/actors/lines_actor.py,sha256=EI2jnaHMVIa7Ru6rDWRnei8_UlRbYz9rMbu4Z0pcjJk,1
|
|
7
7
|
molde/actors/round_points_actor.py,sha256=z2-xAS70LAupK2ZNjgSDI7jtylGqljwp1RUQJv0Rn5U,222
|
8
8
|
molde/actors/square_points_actor.py,sha256=FdtPWHPCd9Ll6M4xmEkfGpaj98JzsLS0ZUcIkY1f8jw,1147
|
9
9
|
molde/colors/__init__.py,sha256=1btZnmV8oHnqK6n9vzB9rLrUAQg7YxnRALSXUtH2NlM,51
|
10
|
-
molde/colors/color.py,sha256=
|
10
|
+
molde/colors/color.py,sha256=8yCMcdJrI7gbtjSp6BPSAMOdKtQtUEwDIbOwlG_XNiw,7807
|
11
11
|
molde/colors/color_names.py,sha256=e4kluhl8BRxiZKs1DE8nfmGtIbTeyli_yje1eb_Jxk0,2958
|
12
12
|
molde/fonts/IBMPlexMono-Bold.ttf,sha256=ykA8VpMbrvMH0gumS2mstxq8rWH3XmZBRmHVdIS2kOw,157924
|
13
13
|
molde/fonts/IBMPlexMono-Regular.ttf,sha256=_hEwSl_pVtV0TptqJGzIPZBCUkXnWmIjAESWbKlqf1A,155940
|
@@ -63,6 +63,6 @@ molde/utils/format_sequences.py,sha256=RHxWGpWBRi89jTk3F4sdlGsKqeheRD49PZMeM36Rs
|
|
63
63
|
molde/utils/poly_data_utils.py,sha256=WoeW46ciuSZB4KO9oh0ksPoxARUbheQDROcjwlpjL4c,2125
|
64
64
|
molde/utils/tree_info.py,sha256=FxgT_uKjtgi0-NVcH41LBoqRmAKt26NJmsjBk1WTqt8,1760
|
65
65
|
molde/windows/loading_window.py,sha256=3U1VEujSKWWWIu1aSqSkYCupTpstI0xks6csJhdKh5Y,6288
|
66
|
-
molde-0.1.
|
67
|
-
molde-0.1.
|
68
|
-
molde-0.1.
|
66
|
+
molde-0.1.16.dist-info/METADATA,sha256=YPGM6FR4XLsUU1q46iC93MxcZxM65qn92hwbI9F81ZM,2102
|
67
|
+
molde-0.1.16.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
68
|
+
molde-0.1.16.dist-info/RECORD,,
|