molde 0.1.14__py3-none-any.whl → 0.1.15__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
@@ -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
- new_color = self.copy()
221
- new_color.r = round(np.clip(self.r * factor, 0, 255))
222
- new_color.g = round(np.clip(self.g * factor, 0, 255))
223
- new_color.b = round(np.clip(self.b * factor, 0, 255))
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: molde
3
- Version: 0.1.14
3
+ Version: 0.1.15
4
4
  Summary:
5
5
  Author: André Fernandes
6
6
  Author-email: fpf.andre@gmail.com
@@ -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=k8vkngW6VQx6GCHyp2g5rU2HDqEF96xCMHWv-f-u_7g,8076
10
+ molde/colors/color.py,sha256=RUa-xmqhZ9zLufLb8MN3rQ5tMeBTsobKx6wBQ5q-j2o,7801
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.14.dist-info/METADATA,sha256=o3bbxUxSLWe6TnOGGNW2a7mECUpKcnda0ermhbN7LEQ,2102
67
- molde-0.1.14.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
68
- molde-0.1.14.dist-info/RECORD,,
66
+ molde-0.1.15.dist-info/METADATA,sha256=aXZ2aD8tlByX1oIFrLtO25aUIxHflklks3TvUSBSz78,2102
67
+ molde-0.1.15.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
68
+ molde-0.1.15.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any