code: def RGB_to_HSV(cobj, *args, **kwargs):
      
      var_R = cobj.rgb_r
      var_G = cobj.rgb_g
      var_B = cobj.rgb_b
  
      var_max = max(var_R, var_G, var_B)
      var_min = min(var_R, var_G, var_B)
  
      var_H = __RGB_to_Hue(var_R, var_G, var_B, var_min, var_max)
  
      if var_max == 0:
          var_S = 0
      else:
          var_S = 1.0 - (var_min / var_max)
  
      var_V = var_max
  
      return HSVColor(
          var_H, var_S, var_V)
docs: Converts from RGB to HSV.
  
      H values are in degrees and are 0 to 360.
      S values are a percentage, 0.0 to 1.0.
      V values are a percentage, 0.0 to 1.0.