示例#1
0
    def test_range(self):
        """Verify that it is possible to produce the entire color range"""

        for k in range(10, 12000, 400):
            r, g, b = kelvin_to_rgb(k)
            self.assertIsInstance(r, int)
            self.assertIsInstance(g, int)
            self.assertIsInstance(b, int)

            with blink1(white_point=(r, g, b)) as b1:
                b1.fade_to_color(0, "white")
                time.sleep(0.05)
示例#2
0
    def test_range(self):
        """Verify that it is possible to produce the entire color range"""

        for k in range(10, 12000, 400):
            r,g,b = kelvin_to_rgb(k)
            self.assertIsInstance(r, int)
            self.assertIsInstance(g, int)
            self.assertIsInstance(b, int)

            with blink1(white_point=(r,g,b)) as b1:
                b1.fade_to_color(0, 'white')
                time.sleep(0.05)
示例#3
0
 def test_red_6000(self):
     r, g, b = kelvin_to_rgb(6000)
     self.assertEquals(r, 255)
示例#4
0
 def test_blue_6700(self):
     r, g, b = kelvin_to_rgb(6700)
     self.assertEquals(b, 255)
示例#5
0
 def test_blue_6700(self):
     r, g, b = kelvin_to_rgb(6700)
     self.assertEquals(b, 255)
示例#6
0
 def test_red_6000(self):
     r, g, b = kelvin_to_rgb(6000)
     self.assertEquals(r, 255)