Pixel buffer accepts tuples but returns lists with different value
See original GitHub issueOn version 4.1.0
color values passed as tuples (r,g,b)
are returned as `[brightnessr,brightnessb,brightness*c]
import board
import neopixel
color_red=(80,0,0)
self.pixels = neopixel.NeoPixel(board.D18, 256, auto_write=False, brightness=0.5)
red = (80,0,0)
pixels[1] = red
print( pixels[1])
Prints [40,0,0]
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Python Return Multiple Values – How to Return a Tuple, List ...
In this article, we'll explore how to return multiple values from these data structures: tuples, lists, and dictionaries.
Read more >How to generate a list of all (x, y, pixel value) tuples from a 2D ...
Shoot it is very close to that. I'm a stack overflow rookie. I'm subtracting two images and then fitting a 3D curve to...
Read more >Map — gammapy v0.7
Interpolate map values at the given pixel coordinates. iter_by_coord ([buffersize]), Iterate over elements of the map returning a tuple with values and map ......
Read more >image — machine vision — MicroPython 1.19 documentation
Returns a converted binary value (0-1) to a 3 value LAB tuple. L goes between 0 and 100 and A/B go from -128...
Read more >pygame.Surface — pygame v2.1.4 documentation
pixel buffer address ... The Surface has a fixed resolution and pixel format. ... Per pixel alphas are different because they store a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue is resolved.
I think you might be hitting this: https://github.com/adafruit/Adafruit_CircuitPython_Pypixelbuf/pull/4#discussion_r368309515 which should be fixed in latest release. Try updating to the 5.0.0 release and see if the problem persists: https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/releases/tag/5.0.0 Return may still be a list, but hopefully will not have the incorrect value.