def _rgb2hs(self, rgb):
        r = rgb[0] / 255.0
        g = rgb[1] / 255.0
        b = rgb[2] / 255.0

        h, s, v = colorsys.rgb_to_hsv(r, g, b)

        h = int(self._mapRange(h, 0.0, 1.0, 0, 65535))
        s = int(self._mapRange(s, 0.0, 1.0, 0, 254))
        return (h, s)
dataset/ETHPy150Open ManiacalLabs/BiblioPixel/bibliopixel/drivers/hue.py/DriverHue._rgb2hs/original