PWM Explained: How LED Lights Dim and Make 16 Million Colors

By Jolly Raleigh · September 17, 2026

TL;DR: LEDs do not dim the way old bulbs do. They blink on and off faster than your eye can see, and the ratio of on-time to off-time sets the brightness. That trick is called PWM, pulse width modulation. Do it on red, green, and blue at the same time and you get 16.7 million colors. The blink speed also decides whether your lights look smooth on video.

Ever wonder how a single light on your roof can be dim red, bright red, pink, or white, all from the same three tiny LEDs? The answer is one simple idea, and once you see it you will spot it everywhere, from phone screens to car taillights.

An LED is either on or off

An old-fashioned bulb dims smoothly. Give it less voltage and it glows less. LEDs are not like that. An LED wants a specific amount of current. Below that, it barely lights. Above that, it burns out. There is no nice "half on."

So how do you dim something that only knows on and off?

You blink it.

Blink faster than the eye can see

Turn an LED on and off 1,000 times a second and you will not see it blink. Your eye averages it out. If it is on for half of each cycle and off for the other half, it looks half as bright. On for a quarter of the cycle, it looks a quarter as bright. That is the whole trick.

The fraction of each cycle the light is on is called the duty cycle. 100 percent duty is fully on. 50 percent duty is half brightness. 0 percent is off. HitLights has a clear walkthrough with the same numbers.

PWM duty cycle diagram showing 100 percent, 50 percent, and 25 percent on-time and the LED brightness each one produces

Pulse width modulation is the fancy name. "Pulse" is each blink. "Width" is how long the blink lasts. "Modulation" means changing it. PWM = changing how wide the blinks are.

Why PWM instead of just lowering the voltage

Two reasons:

  1. LEDs do not dim well with voltage. They go from dark to full over a tiny voltage range, and they drift with temperature. You cannot get a reliable 30 percent by picking a voltage.
  2. The color stays true. An LED's color shifts slightly when you starve it of current. With PWM the LED is always at full current when it is on, so the color never changes. Only the average brightness does.

256 steps per color makes 16.7 million colors

The chips in addressable lights use 8-bit PWM. Eight bits means 256 possible values, from 0 to 255. So each color can be set to any of 256 brightness levels.

Each light has three LEDs: red, green, and blue. Each one gets its own 256-step dimmer. Multiply them together:

256 x 256 x 256 = 16,777,216 colors.

That is where "16 million colors" on the box comes from. Red 255, green 0, blue 0 is pure red. Red 255, green 255, blue 255 is white. Red 128, green 0, blue 128 is a dim purple.

Your app shows a color wheel. Behind the scenes it is just picking three numbers and sending them down the data wire, 24 bits per light. See what controls permanent lights: the microcontroller explained for how those bits travel.

Why "half brightness" does not look half as bright

Here is a fun wrinkle. Set a light to 128 out of 255 and it looks a lot brighter than half. That is because your eyes are more sensitive to changes in dim light than in bright light. Going from 1 to 2 looks like a big jump. Going from 254 to 255 looks like nothing.

Good controllers fix this with gamma correction, a lookup table that bends the numbers so the steps look even to a human. Hackaday has a great explainer on why this matters. Some newer light chips, like the GS8208, do gamma correction inside the chip.

The blink speed matters more than you think

How many times per second the light blinks is the PWM frequency. Two different things care about it:

Your eyes. Above roughly 100 blinks per second, most people see steady light. LEDYi's PWM guide notes that below that, people see flicker and get eye fatigue.

Your camera. A phone camera samples the scene many times a second. If the light blinks at a rate close to the camera's shutter, you get dark bands rolling through the video. This is the number one reason someone's roofline looks perfect in person and terrible on Instagram.

Different chips blink at very different speeds:

ChipPWM frequencyOn video
WS2812B (older)about 400 HzVisible banding likely
WS2813 / WS2815about 2,000 HzUsually clean
SK9822about 4,700 HzClean
GS8208about 8,000 HzClean
APA102up to about 20,000 HzClean

Sources: ENTTEC's WS2812B protocol page, Advatek's refresh rate and PWM rate guide, and SuperLightingLED's clocked-chip comparison.

If you want your house to look good in the holiday video you post, the chips inside the lights matter. Higher PWM frequency is better.

PWM frequency vs refresh rate: not the same thing

People mix these up. PWM frequency is how fast each LED blinks to fake a brightness. It is set by the chip in the light. Refresh rate is how many times per second the controller sends a new set of colors to the whole run. It depends on how many lights are on one wire.

A light can blink at 2,000 Hz while the controller only updates it 30 times a second. Both numbers matter. PWM frequency decides camera flicker. Refresh rate decides how smooth a chase looks.

Where PWM shows up on your roof

Every color you pick, every fade, every "sunset" scene is PWM doing its job. The controller sends three 8-bit numbers to each light. The chip in each light runs three PWM dimmers. Your eye blends the result into one color.

Our permanent RGB lighting uses addressable lights with this exact system, which is how one track does Christmas red and green, Fourth of July, and a soft warm white the rest of the year.

Frequently asked questions

What does PWM stand for?

Pulse width modulation. It dims an LED by blinking it faster than the eye can see and changing how long each blink lasts.

Does PWM dimming hurt LEDs?

No. The LED runs at its normal current when on and simply rests when off. PWM is the standard way to dim LEDs, including the ones in your phone screen.

Why do my LED lights flicker on camera but not in person?

The PWM frequency is close to your camera's shutter speed. Your eye averages the blinks; the camera catches them. Lights built on chips with higher PWM frequency (2,000 Hz and up) fix this.

How many colors can RGB lights make?

With 8-bit control, 256 levels each of red, green, and blue, or 16,777,216 combinations. In practice many of those are too close to tell apart, but the "16 million" number is real math.

Further reading

← Back to Blog