@@ -189,21 +189,21 @@ def r(self) -> int:
189189 return self ._r
190190 @r .setter
191191 def r (self , value : int | float ):
192- self ._r = RoundHalfUp ( Constrain ( value , 255 )) if init . roundUp else round (Constrain (value , 255 ))
192+ self ._r = round (Constrain (value , 255 ))
193193
194194 @property
195195 def g (self ) -> int :
196196 return self ._g
197197 @g .setter
198198 def g (self , value : int | float ):
199- self ._g = RoundHalfUp ( Constrain ( value , 255 )) if init . roundUp else round (Constrain (value , 255 ))
199+ self ._g = round (Constrain (value , 255 ))
200200
201201 @property
202202 def b (self ) -> int :
203203 return self ._b
204204 @b .setter
205205 def b (self , value : int | float ):
206- self ._b = RoundHalfUp ( Constrain ( value , 255 )) if init . roundUp else round (Constrain (value , 255 ))
206+ self ._b = round (Constrain (value , 255 ))
207207
208208 # ------------------------------------------------------------------------------------------------------------------
209209 # MAGIC Methods
@@ -296,29 +296,29 @@ def r(self) -> int:
296296 return self ._r
297297 @r .setter
298298 def r (self , value : int | float ):
299- self ._r = RoundHalfUp ( Constrain ( value , 255 )) if init . roundUp else round (Constrain (value , 255 ))
299+ self ._r = round (Constrain (value , 255 ))
300300
301301 @property
302302 def g (self ) -> int :
303303 return self ._g
304304 @g .setter
305305 def g (self , value : int | float ):
306- self ._g = RoundHalfUp ( Constrain ( value , 255 )) if init . roundUp else round (Constrain (value , 255 ))
306+ self ._g = round (Constrain (value , 255 ))
307307
308308 @property
309309 def b (self ) -> int :
310310 return self ._b
311311 @b .setter
312312 def b (self , value : int | float ):
313- self ._b = RoundHalfUp ( Constrain ( value , 255 )) if init . roundUp else round (Constrain (value , 255 ))
313+ self ._b = round (Constrain (value , 255 ))
314314
315315
316316 @property
317317 def a (self ) -> int :
318318 return self ._a
319319 @a .setter
320320 def a (self , value : int | float ):
321- self ._a = RoundHalfUp ( Constrain ( value , 255 )) if init . roundUp else round (Constrain (value , 255 ))
321+ self ._a = round (Constrain (value , 255 ))
322322 # ------------------------------------------------------------------------------------------------------------------
323323 # MAGIC Methods
324324 # ------------------------------------------------------------------------------------------------------------------
0 commit comments