Simple test¶
Ensure your device works with this simple test.
1# SPDX-FileCopyrightText: 2021 Tim Cocks for Adafruit Industries
2#
3# SPDX-License-Identifier: MIT
4
5import colorsys
6
7hls = (0.4, 0.7, 0.5)
8rgb = colorsys.hls_to_rgb(hls[0], hls[1], hls[2])
9print("HLS {} == RGB {}".format(hls, rgb))
10
11hsv = (0.8, 0.5, 0.5)
12rgb = colorsys.hsv_to_rgb(hsv[0], hsv[1], hsv[2])
13print("HSV {} == RGB {}".format(hsv, rgb))