

def _a					(			SCREAMING_SNAKE_CASE						:     float       ,   SCREAMING_SNAKE_CASE						:     float       ,   SCREAMING_SNAKE_CASE						:     float						)       ->       list[int]:

 """simple docstring"""






 if hue < 0 or hue > 3_60:
  raise Exception('hue should be between 0 and 360'						)

 if saturation < 0 or saturation > 1:
  raise Exception('saturation should be between 0 and 1'						)

 if value < 0 or value > 1:
  raise Exception('value should be between 0 and 1'						)

 __lowerCAmelCase:  List[Any]        = value * saturation
 __lowerCAmelCase:  Optional[Any]        = hue / 60
 __lowerCAmelCase:  Any        = chroma * (1 - abs(hue_section % 2 - 1						))
 __lowerCAmelCase:  List[str]        = value - chroma

 if hue_section >= 0 and hue_section <= 1:
  __lowerCAmelCase:  Dict        = round(2_55 * (chroma + match_value)						)
  __lowerCAmelCase:  str        = round(2_55 * (second_largest_component + match_value)						)
  __lowerCAmelCase:  List[Any]        = round(2_55 * (match_value)						)
 elif hue_section > 1 and hue_section <= 2:
  __lowerCAmelCase:  Union[str, Any]        = round(2_55 * (second_largest_component + match_value)						)
  __lowerCAmelCase:  Union[str, Any]        = round(2_55 * (chroma + match_value)						)
  __lowerCAmelCase:  List[str]        = round(2_55 * (match_value)						)
 elif hue_section > 2 and hue_section <= 3:
  __lowerCAmelCase:  Tuple        = round(2_55 * (match_value)						)
  __lowerCAmelCase:  Optional[int]        = round(2_55 * (chroma + match_value)						)
  __lowerCAmelCase:  int        = round(2_55 * (second_largest_component + match_value)						)
 elif hue_section > 3 and hue_section <= 4:
  __lowerCAmelCase:  Tuple        = round(2_55 * (match_value)						)
  __lowerCAmelCase:  Optional[Any]        = round(2_55 * (second_largest_component + match_value)						)
  __lowerCAmelCase:  List[Any]        = round(2_55 * (chroma + match_value)						)
 elif hue_section > 4 and hue_section <= 5:
  __lowerCAmelCase:  int        = round(2_55 * (second_largest_component + match_value)						)
  __lowerCAmelCase:  Union[str, Any]        = round(2_55 * (match_value)						)
  __lowerCAmelCase:  str        = round(2_55 * (chroma + match_value)						)
 else:
  __lowerCAmelCase:  Any        = round(2_55 * (chroma + match_value)						)
  __lowerCAmelCase:  str        = round(2_55 * (match_value)						)
  __lowerCAmelCase:  Dict        = round(2_55 * (second_largest_component + match_value)						)

 return [red, green, blue]







def _a					(			SCREAMING_SNAKE_CASE						:     int       ,   SCREAMING_SNAKE_CASE						:     int       ,   SCREAMING_SNAKE_CASE						:     int						)       ->       list[float]:

 """simple docstring"""






 if red < 0 or red > 2_55:
  raise Exception('red should be between 0 and 255'						)

 if green < 0 or green > 2_55:
  raise Exception('green should be between 0 and 255'						)

 if blue < 0 or blue > 2_55:
  raise Exception('blue should be between 0 and 255'						)

 __lowerCAmelCase:  Union[str, Any]        = red / 2_55
 __lowerCAmelCase:  int        = green / 2_55
 __lowerCAmelCase:  Optional[Any]        = blue / 2_55
 __lowerCAmelCase:  Tuple        = max(SCREAMING_SNAKE_CASE       ,   SCREAMING_SNAKE_CASE       ,   SCREAMING_SNAKE_CASE						)
 __lowerCAmelCase:  int        = value - min(SCREAMING_SNAKE_CASE       ,   SCREAMING_SNAKE_CASE       ,   SCREAMING_SNAKE_CASE						)
 __lowerCAmelCase:  Optional[Any]        = 0 if value == 0 else chroma / value

 if chroma == 0:
  __lowerCAmelCase:  List[str]        = 0.0
 elif value == float_red:
  __lowerCAmelCase:  Any        = 60 * (0 + (float_green - float_blue) / chroma)
 elif value == float_green:
  __lowerCAmelCase:  Optional[int]        = 60 * (2 + (float_blue - float_red) / chroma)
 else:
  __lowerCAmelCase:  Tuple        = 60 * (4 + (float_red - float_green) / chroma)

 __lowerCAmelCase:  List[Any]        = (hue + 3_60) % 3_60

 return [hue, saturation, value]







def _a					(			SCREAMING_SNAKE_CASE						:     list[float]       ,   SCREAMING_SNAKE_CASE						:     list[float]						)       ->       bool:

 """simple docstring"""






 __lowerCAmelCase:  Optional[Any]        = abs(hsv_a[0] - hsv_a[0]						) < 0.2
 __lowerCAmelCase:  Optional[int]        = abs(hsv_a[1] - hsv_a[1]						) < 0.0_0_2
 __lowerCAmelCase:  List[Any]        = abs(hsv_a[2] - hsv_a[2]						) < 0.0_0_2

 return check_hue and check_saturation and check_value








def _a					(			SCREAMING_SNAKE_CASE						:     str						)       ->       str:

 """simple docstring"""






 return "".join(chr(ord(SCREAMING_SNAKE_CASE						) + 32						) if 'A' <= char <= 'Z' else char for char in word						)


if __name__ == "__main__":
  from doctest import testmod

  testmod()





