rgbToHsv (rgb) {
      const r = rgb.r / 255; const g = rgb.g / 255; const b = rgb.b / 255; const hsv = { h: 0, s: 0, v: 0 }
      let min = 0; let max = 0
      if (r >= g && r >= b) {
        max = r
        min = g > b ? b : g
      } else if (g >= b && g >= r) {
        max = g
        min = r > b ? b : r
      } else {
        max = b
        min = g > r ? r : g
      }
      hsv.v = max
      hsv.s = max ? (max - min) / max : 0
      let delta
      if (!hsv.s) hsv.h = 0
      else {
        delta = max - min
        if (r === max) hsv.h = (g - b) / delta
        else if (g === max) hsv.h = 2 + (b - r) / delta
        else hsv.h = 4 + (r - g) / delta
        hsv.h = Number.parseInt(hsv.h * 60)
        if (hsv.h < 0) hsv.h += 360
      }
      hsv.s = (hsv.s * 100) | 0
      hsv.v = (hsv.v * 100) | 0
      return hsv
    }
@param {module:jPicker.RGB} rgb
@returns {module:jPicker.HSV}