1
1
2
- Introduction
3
- ============
2
+ Adafruit CircuitPython NeoPixel
3
+ ===============================
4
4
5
5
.. image :: https://readthedocs.org/projects/adafruit-circuitpython-neopixel/badge/?version=latest
6
6
:target: https://circuitpython.readthedocs.io/projects/neopixel/en/latest/
@@ -10,20 +10,24 @@ Introduction
10
10
:target: https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
11
11
:alt: Gitter
12
12
13
+ .. image :: https://img.shields.io/discord/327254708534116352.svg
14
+ :target: https://adafru.it/discord
15
+ :alt: Discord
16
+
13
17
Higher level NeoPixel driver that presents the strip as a sequence. This is a
14
18
supercharged version of the original MicroPython driver. Its now more like a
15
19
normal Python sequence and features slice support, ``repr `` and ``len `` support.
16
20
17
- Colors are now stored as ints by default rather than tuples. However, you can
18
- still use the tuple syntax to set values. For example, ``0x100000 `` is
19
- equivalent to ``(0x10, 0, 0) ``. To make it easier to read and control each
20
- color component, readback values are expressed as tuples.
21
+ Colors are stored as tuples by default. However, you can also use int hex syntax
22
+ to set values similar to colors on the web. For example, ``0x100000 `` (``#100000 ``
23
+ on the web) is equivalent to ``(0x10, 0, 0) ``.
21
24
22
- .. note :: This API represents the brightness of the white pixel when present by
23
- setting the RGB channels to identical values. For example, full white is
24
- 0xffffff but is actually (0, 0, 0, 0xff) in the tuple syntax. Setting a pixel
25
- value with an int will use the white pixel if the RGB channels are identical.
26
- For full, independent, control of each color component use the tuple syntax.
25
+ .. note :: The int hex API represents the brightness of the white pixel when
26
+ present by setting the RGB channels to identical values. For example, full
27
+ white is 0xffffff but is actually (0, 0, 0, 0xff) in the tuple syntax. Setting
28
+ a pixel value with an int will use the white pixel if the RGB channels are
29
+ identical. For full, independent, control of each color component use the
30
+ tuple syntax.
27
31
28
32
Dependencies
29
33
=============
0 commit comments