NeoPixel RGB order

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

NeoPixel RGB order

Post by splatten »

I have used (NEO_RGB + NEO_KHZ800) for the third parameter of the NeoPixel constructor however it appears to be using the default:
(NEO_GRB + NEO_KHZ800).

I've tested with:
ff = Blue
ff00 = Red
ff0000 = Green

I would expect ff0000 to be red as per my setting, but red and green seem swapped.

I'm not sure why and I will continue to investigate.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: NeoPixel RGB order

Post by adafruit_support_bill »

The third parameter specifies the color ordering used by the pixels, not the API. The API is always RGB. Some pixels are RGB and some are GRB. If the colors appear reversed using the RGB option, than your pixels are GRB.

User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

Re: NeoPixel RGB order

Post by splatten »

Thank you, this explains it!

User avatar
splatten
 
Posts: 439
Joined: Mon Mar 17, 2014 3:08 pm

Re: NeoPixel RGB order

Post by splatten »

Turns out that my 24 Neopixel ring is ordered GRB and the 16 Neopixel ring is ordered BRG.

Hadn't noticed this before as to date I've been using fading transistions and not noticed that the base colours were different.

Now I'm setting the colour according to temperature.

Is this normal, is the mode of the Neopixel's set to a standard or random?

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”