@@ -35,7 +35,6 @@ def wrapper(self,other:ColorSystem|int|tuple):
3535# - Actual Color System -
3636# ----------------------------------------------------------------------------------------------------------------------
3737class ColorSystem (ABC ):
38- @abstractmethod
3938 def __init__ (self , * _ ):
4039 # no 'ColorSystem' can be created on its own
4140 raise PermissionError
@@ -111,28 +110,36 @@ def __pow__(self, other: ColorSystem|int|tuple) -> ColorSystem:
111110
112111 @ _ColorConversionInput
113112 def __iadd__ (self , other : ColorSystem | int | tuple ) -> ColorSystem :
114- return self ._value_setter (CSD .add (self .export (), other ))
113+ self ._value_setter (CSD .add (self .export (), other ))
114+ return self
115115 @ _ColorConversionInput
116116 def __isub__ (self , other : ColorSystem | int | tuple ) -> ColorSystem :
117- return self ._value_setter (CSD .sub (self .export (), other ))
117+ self ._value_setter (CSD .sub (self .export (), other ))
118+ return self
118119 @ _ColorConversionInput
119120 def __imul__ (self , other : ColorSystem | int | tuple ) -> ColorSystem :
120- return self ._value_setter (CSD .mul (self .export (), other ))
121+ self ._value_setter (CSD .mul (self .export (), other ))
122+ return self
121123 @ _ColorConversionInput
122124 def __ifloordiv__ (self , other : ColorSystem | int | tuple ) -> ColorSystem :
123- return self ._value_setter (CSD .floordiv (self .export (), other ))
125+ self ._value_setter (CSD .floordiv (self .export (), other ))
126+ return self
124127 @ _ColorConversionInput
125128 def __itruediv__ (self , other : ColorSystem | int | tuple ) -> ColorSystem :
126- return self ._value_setter (CSD .truediv (self .export (), other ))
129+ self ._value_setter (CSD .truediv (self .export (), other ))
130+ return self
127131 @ _ColorConversionInput
128132 def __itruediv__ (self , other : ColorSystem | int | tuple ) -> ColorSystem :
129- return self ._value_setter (CSD .truediv (self .export (), other ))
133+ self ._value_setter (CSD .truediv (self .export (), other ))
134+ return self
130135 @ _ColorConversionInput
131136 def __imod__ (self , other : ColorSystem | int | tuple ) -> ColorSystem :
132- return self ._value_setter (CSD .mod (self .export (), other ))
137+ self ._value_setter (CSD .mod (self .export (), other ))
138+ return self
133139 @ _ColorConversionInput
134140 def __ipow__ (self , other : ColorSystem | int | tuple ) -> ColorSystem :
135- return self ._value_setter (CSD .power (self .export (), other ))
141+ self ._value_setter (CSD .power (self .export (), other ))
142+ return self
136143
137144 # ------------------------------------------------------------------------------------------------------------------
138145 # - Comparison Dunders -
@@ -164,6 +171,8 @@ def __ge__(self, other: ColorSystem|int|float|tuple) -> bool:
164171# - RGB -
165172# ------------------------------------------------------------------------------------------------------------------
166173class RGB (ColorSystem ):
174+ __slots__ = "_r" ,"_g" ,"_b"
175+
167176 """
168177 Color Object for RGB values.
169178 All r,g,b values are integer values which range between 0 and 255, including.
@@ -216,6 +225,8 @@ def __repr__(self) -> str:
216225# ----------------------------------------------------------------------------------------------------------------------
217226# inherits from rgb as it is just another notation of the rgb format
218227class HEX (RGB ):
228+ __slots__ = "_r" ,"_g" ,"_b"
229+
219230 """
220231 Color Object for HEX values.
221232 Inherits from RGB as this is just another notation for RGB values.
@@ -271,6 +282,8 @@ def __pow__(self, other: ColorSystem|int|tuple) -> ColorSystem:
271282# - RGBA -
272283# ------------------------------------------------------------------------------------------------------------------
273284class RGBA (ColorSystem ):
285+ __slots__ = "_r" ,"_g" ,"_b" , "_a"
286+
274287 """
275288 Color Object for RGBA values.
276289 All r,g,b,a values are integer values which range between 0 and 255, including.
@@ -330,6 +343,8 @@ def __repr__(self) -> str:
330343# ----------------------------------------------------------------------------------------------------------------------
331344# inherits from rgba as it is just another notation of the rgb format
332345class HEXA (RGBA ):
346+ __slots__ = "_r" ,"_g" ,"_b" , "_a"
347+
333348 """
334349 Color Object for HEXA values.
335350 Inherits from RGBA as this is just another notation for RGBA values.
@@ -385,6 +400,8 @@ def __pow__(self, other: ColorSystem|int|tuple) -> ColorSystem:
385400# - HSV -
386401# ------------------------------------------------------------------------------------------------------------------
387402class HSV (ColorSystem ):
403+ __slots__ = "_h" ,"_s" ,"_v"
404+
388405 """
389406 Color Object for HSV values.
390407 The h value is a float value which ranges between 0 and 360, including.
@@ -437,6 +454,8 @@ def __repr__(self) -> str:
437454# - HSL -
438455# ------------------------------------------------------------------------------------------------------------------
439456class HSL (ColorSystem ):
457+ __slots__ = "_h" ,"_s" ,"_l"
458+
440459 """
441460 Color Object for HSL values.
442461 The h value is a float value which ranges between 0 and 360, including.
@@ -489,6 +508,8 @@ def __repr__(self) -> str:
489508# - CMYK -
490509# ----------------------------------------------------------------------------------------------------------------------
491510class CMYK (ColorSystem ):
511+ __slots__ = "_c" ,"_m" ,"_y" ,"_k"
512+
492513 """
493514 Color Object for CMYK values.
494515 All c,m,y,k values are float values which range between 0 and 1, including
0 commit comments