WS2812B LED control problem

Hi All,
I connected 16 WS2812B and found it's color will become abnormal frequently.
I tried to debug the code but the data is all alright.

So I come back to check if the hardware issue , I look some discussion and noted some people
said we need to connect 300 ohm register between controller and ws2812b , is it true ?

thanks

Yes. And a 1000uF cap across the strip power leads is recommended. If you have more than a few pixels, you will need an external 5V power supply for the strip. The Arduino 5V is not very powerful.