@@ -327,14 +327,14 @@ async def toggle_nightlight(self, toggle: bool | None = None) -> bool:
327327
328328 # 8-color gradient used by VeSync app for RGB nightlight color slider
329329 _RGB_NIGHTLIGHT_GRADIENT : ClassVar [list [tuple [int , int , int ]]] = [
330- (252 , 50 , 0 ), # #fc3200 - Red (position 0)
331- (255 , 171 , 2 ), # #ffab02 - Orange (position ~14.3)
332- (181 , 255 , 0 ), # #b5ff00 - Yellow-Green (position ~28.6)
333- (2 , 255 , 120 ), # #02ff78 - Green (position ~42.9)
334- (3 , 200 , 254 ), # #03c8fe - Cyan (position ~57.1)
335- (0 , 40 , 255 ), # #0028ff - Blue (position ~71.4)
336- (220 , 0 , 255 ), # #dc00ff - Purple (position ~85.7)
337- (254 , 0 , 60 ), # #fe003c - Pink/Red (position 100)
330+ (252 , 50 , 0 ), # #fc3200 - Red (position 0)
331+ (255 , 171 , 2 ), # #ffab02 - Orange (position ~14.3)
332+ (181 , 255 , 0 ), # #b5ff00 - Yellow-Green (position ~28.6)
333+ (2 , 255 , 120 ), # #02ff78 - Green (position ~42.9)
334+ (3 , 200 , 254 ), # #03c8fe - Cyan (position ~57.1)
335+ (0 , 40 , 255 ), # #0028ff - Blue (position ~71.4)
336+ (220 , 0 , 255 ), # #dc00ff - Purple (position ~85.7)
337+ (254 , 0 , 60 ), # #fe003c - Pink/Red (position 100)
338338 ]
339339
340340 @staticmethod
@@ -452,8 +452,7 @@ def _rgb_to_color_slider_location(cls, red: int, green: int, blue: int) -> int:
452452 fraction = step / 100.0
453453 interp_color = cls ._interpolate_color (color1 , color2 , fraction )
454454 distance = cls ._color_distance (
455- red , green , blue ,
456- interp_color [0 ], interp_color [1 ], interp_color [2 ]
455+ red , green , blue , interp_color [0 ], interp_color [1 ], interp_color [2 ]
457456 )
458457
459458 if distance < best_distance :
0 commit comments