WLED WLED Max Segments Segment Studio

WLED Segments Explained

What a WLED segment is, how start, stop, grouping, spacing and mirror work, segment limits on ESP8266 and ESP32, and WLED 16 blend modes.

By Published Updated on

A segment is just a range of LEDs with its own effect, colors, palette, speed and brightness. Split a TV backlight into left and right and you have two segments. Every WLED light starts with one segment that covers all of its LEDs, and you can add more in the web UI’s Segments panel. Segments can even overlap, which is either a neat trick or the reason your strip flickers.

What a segment holds

Each segment has:

  • Start and Stop: the LED range. Start is included, Stop is not, so a segment from 0 to 30 covers LEDs 0 to 29 (30 LEDs). This trips up almost everyone once.
030150300
  • Its own effect, palette, three colors, speed, intensity and extra effect sliders.
  • Its own brightness (opacity) and on/off state, on top of the light’s main brightness.
  • Grouping: how many LEDs act as one pixel. Grouping 3 makes every effect pixel 3 LEDs wide.
  • Spacing: how many LEDs to skip after each group. Grouping 1, spacing 1 lights every other LED.

Grouping 1, spacing 1 lights every other LED.

  • Offset: shifts where the effect starts inside the segment.
  • Reverse: runs the effect in the other direction.
  • Mirror: renders the effect on the first half and mirrors it onto the second half. Handy for a strip that goes up one side of a window and down the other.
  • On a matrix: X and Y start and stop instead of one range.

How many you get

The limit is compiled into the firmware:

ChipMax segments
ESP826616
ESP32, S3, C332
ESP32-S220 on 0.15.1 and later 0.15 releases (0.15.0 allowed 32), 32 on WLED 16
ESP32 with PSRAM (WLED 16)64

Memory matters too. Some effects need RAM per segment, and on an ESP8266 a handful of heavy effects can run out before you reach 16.

Selected vs main

Two ideas in the web UI confuse people more than anything else here.

Selected segments (the checkbox next to each one) are the ones that receive your color, effect and palette changes. If you change the color and nothing happens, the segment you’re looking at probably isn’t selected.

WLED web UI
WLED web interface Segments tab with three segments named Left, Middle and Right, each with a selection checkbox; Middle is expanded with Start LED 100, Stop LED 200, Grouping 1, Spacing 0, 100 LEDs, Blend mode, Reverse direction and Mirror effect
The checkbox on each segment row is the "selected" switch. Middle is expanded to show its settings.

The main segment is the first selected one. A few features only act on it, for example realtime data when Use main segment only is on.

Adding segments in the web UI

  1. Open the Segments panel.
  2. Tap + Add segment and type Start and Stop. The new segment shows up with its own settings.
  3. Expand it to set Grouping, Spacing, Offset, Reverse and Mirror.
  4. Tick its checkbox, then pick an effect and colors as usual.
  5. Save the layout in a preset with Save segment bounds ticked. Without that, the layout is gone the next time you load another preset. More in WLED presets and the power-on preset.

It’s precise, but you’re working blind. You type numbers, then go look at the strip to see what you did.

Overlaps and blend modes

Two segments can cover the same LEDs. WLED draws them in order, so the later one paints over the earlier one where they meet. Sometimes that’s on purpose: stacked segments are how you build some repeating patterns (see the 2 red 1 white pattern guide). More often it’s an accident after editing numbers, and you get flicker or a segment that seems to be missing.

0150200300

WLED 16 adds a blend mode per segment, which controls how it combines with whatever is underneath. The default, Top, replaces what’s below. The others (Add, Multiply, Screen and so on, 17 in total) mix colors, so you can layer looks that older versions couldn’t do.

Editing segments in Segment Studio

In WLED Max, Segment Studio draws your segments on a picture of the strip (LED Strip) or the matrix grid (LED Matrix). Open it from the Control tab with the Segment Studio tile, or, on a light that already has more than one segment, tap Studio in the segments row.

iOS
Segment Studio on iPhone with one segment of 283 LEDs: Load and Save buttons, Split into N, 2 Equal and 3 Equal chips, and a live LED Strip preview
One segment, with the quick split chips.
iOS
Segment Studio after 3 Equal: a red, green and blue bar, segment 1 selected covering 0 to 94, segment chips 1, 2 and 3, From, To and Len steppers, and the Segment 1 panel with effect and colors
After 3 Equal. From, To and Len for exact numbers.

You can drag a segment’s edges, or type exact numbers in the From, To and Len fields when you need precision. Each segment gets its own effect, palette, colors, brightness, speed, intensity, Grouping & Spacing, Reverse Direction and Mirror Effect, plus Blend mode on WLED 16.

Splitting works a little differently on each platform. Split into N segments divides the whole strip evenly on both, and quick chips (2 Equal, 3 Equal, 4 Equal) show while the light has a single segment. iOS adds Mirror, Center Accent (20% edges, 60% center) and Chase Lanes. Android has Split selected in half for cutting one segment in two.

A few other things it does:

  • Flags overlaps (“Segments 2 & 3 overlap on LEDs …”) and offers Trim, which shortens one of them until the overlap is gone.
  • When you delete a segment, it asks whether to leave a gap or merge the LEDs into the left or right neighbor. You get 5 seconds to undo.
  • Duplicate, Reset to Single, saving and loading layouts as presets, and an All segments table that shows gaps.
  • A picture of the strip that shows the real colors of your LEDs while the light is reachable, and your layout when it isn’t (the LIVE, SIM and OFFLINE badge below).
Segment Studio menu opened from the three dots: Refresh from Device, Transition Style and Reset to Single
Reset to Single lives in the menu at the top right.

LIVE, SIM and OFFLINE

The picture of the strip carries a small badge that says what you are looking at:

  • LIVE: the colors your LEDs are showing right now, straight from the light. Effects move on the picture the way they move on the strip.
  • SIM: the app’s own preview of each segment’s effect. The light isn’t sending its live view at the moment, most often because the WLED web page (its Peek bar) or another app is watching the same light, and WLED sends the live view to one viewer at a time. Older firmware without a live view shows SIM too. Grouping, spacing, reverse and mirror are approximate in this preview, and the badge’s explanation says so when one of them is in use.
  • OFFLINE: the light can’t be reached. The Studio shows the last layout it knew and writes nothing until the light is back.

Tap the badge for a short explanation of the current state, with the reason when the app knows it (“Another app or the WLED page is using the live view.”).

The Studio follows your light

Segment Studio keeps following the light the whole time it is open. When a running playlist, the WLED web page, another phone or Home Assistant changes the segments, the cards and the strip update within a moment, and your selection stays on the same segment. What that means in practice:

  • While you drag a handle or edit a segment, your work is kept. The rest of the layout updates around it, and anything held back arrives as soon as you let go.
  • If the segment you are editing disappears on the light (a playlist step with a different layout, for example), its panel closes with the note “This segment changed on the light.” Nothing is written.
  • Editing a segment while a playlist runs stops the playlist. That’s how WLED works, and the app tells you once: “Editing a segment stops the playing playlist.”
  • When the light is off, the segments show dimmed and the summary line says “Light is off”.

Adding a segment when every LED is taken

What Add does depends on how much room is left on the strip:

  • With free LEDs left, the new segment goes into the gap.
  • With no free LEDs, you get No free space: “Every LED already belongs to a segment. To add a new one, an existing segment needs to get shorter.” The popup names the segment it would shorten and asks. Tap Make room and the app shortens the selected segment (or the longest one, if nothing is selected or the selected one is too short) by half from its end, puts the new segment into the freed LEDs with the same effect and colors so nothing goes dark, and selects it. An Undo bar (“Made room for a new segment”) gives you 5 seconds to take it back.
  • When the light already has as many segments as its firmware allows, you get Segment limit reached, with the number: “This light allows 32 segments. Remove one to add another.”
  • When every segment is too short to split (fewer than 4 LEDs each), the No free space message asks you to make a segment longer in the editor first.

Reset to Single asks first

Reset to Single replaces every segment with one segment over the whole strip. It asks first (“Reset to one segment?”) and tells you how many segments and names it replaces. After you confirm, an Undo bar (“Segments reset”) stays for 10 seconds.

On an iPad or a tablet

On an iPad, and on Android tablets and unfolded foldables with a wide screen, the segment panel (effect, colors, brightness, Grouping & Spacing and the rest) opens beside the strip instead of over it, so the whole strip stays in view while you edit. Close it with the X at the top of the panel. On phones the panel is a sheet that slides up from the bottom and stops below the From, To and Len fields, so those stay visible; drag the sheet up for the rest of the controls.

For a quick color change you don’t need the Studio at all. Tap a segment chip on the Control tab and change its color there.

Segments not saving or keep resetting

WLED doesn’t store the segment layout in its settings. It lives in memory, so after a reboot or a power cut the light starts with its default segments again, unless a preset puts them back.

  • Gone after a reboot. Save the layout in a preset with Save segment bounds ticked, then make that preset the power-on preset (Apply preset at boot). See WLED presets and the power-on preset.
  • Reset when you load a preset. The preset was saved with segment bounds from an older layout. Load your current layout, then save it into that preset again.
  • Changed by another light. With UDP sync, a receiving light that has Segment options and bounds ticked under Receive (Config > Sync Interfaces) takes the sender’s segments. Untick bounds on lights with their own layout.
  • Changed by Home Assistant or a script. Anything that sends segment settings to the light can change them. Check automations that load presets or set segments.

Segments acting strange

My segment is one LED short. Stop is exclusive. For LEDs 0 to 29, Stop is 30.

Changing the color only affects part of the strip. Only some segments are selected. Select all of them in the web UI, or pick the segment chips you want in the app.

I can’t add another segment. You’ve hit the firmware limit (16 on ESP8266), and the web UI stops offering Add segment. Merge a few, or use grouping instead of separate segments.

Part of the strip stays lit in an old color. No segment covers those LEDs, and on 0.14 and 0.15 uncovered LEDs keep their last color. Stretch a segment over the gap or reset to a single segment.

Segments disappear after loading a preset. That preset was probably saved with a different layout, since Save segment bounds stores whatever layout you had at the time. Set the layout up again and save it into the preset.

FAQ

What are segments in WLED? Ranges of LEDs on one light that each run their own effect and colors.

How many segments can WLED have? 16 on ESP8266, 32 on most ESP32 boards (20 on an ESP32-S2 with 0.15.1 and later 0.15 releases, 64 on ESP32 boards with PSRAM running WLED 16).

Can WLED segments overlap? Yes. The later segment draws on top, and on WLED 16 blend modes control how they mix.

If you want exact numbers for halves, thirds or a center accent, the zones guide has them worked out.

Who wrote this

Jamie Conde, who builds the WLED Max app at MeowScript. WLED itself is an independent open source project, and we are not part of it. WLED Max, our WLED app for iOS and Android, is free for one light with nothing held back. A one-time purchase covers more lights.