Skip to content

Random colors via JSON API in Segment object like "col":["r","r","r"] #4996

Closed

Description

@AlexeyMal

Dear Developers,

could you please add the option to set Random colors via JSON API in Segment object like col:["r","r","r"]?
As an alternative to setting the colors to the fix values.
Similar to the already impleneted "r" for palette pal and effect fx.

Why? Many people scoll through all effects and palettes using a playlist with one random effect and palette. But some effects use the 1 to 3 colors instead of the palette, so for them the colors can not be set randomly.

Thank you very much!
Best regards

Activity

  1. AlexeyMal commented on Oct 11, 2025

    @AlexeyMal
    ContributorAuthor

    Implemented and tested this feature, please pull it:
    #5000

  2. changed the title [-]Random colors via JSON API in Segment object like col=["r","r","r"][/-] [+]Random colors via JSON API in Segment object like col:["r","r","r"][/+] on Oct 12, 2025
  3. AlexeyMal commented on Oct 12, 2025

    @AlexeyMal
    ContributorAuthor

    wled-presets.json example:
    {
    "9":{"playlist":{"ps":[12],"dur":[600],"transition":[30],"repeat":0,"r":false,"end":0},"on":true,"n":"AllRandomPlaylist"},

    "12":{"bri":255,"mainseg":0,"on":true,"seg":[{"bri":255,"c1":128,"c2":128,"c3":16,"cct":127,"col":["r",[0,0,0], "r"],"frz":false,"fx":"r","grp":1,"id":0,"ix":128,"m12":1,"mi":false,"o1":false,"o2":false,"o3":false,"of":0,"on":true,"pal":"r","rev":false,"sel":true,"set":0,"si":0,"spc":0,"start":0,"stop":50,"sx":128 ,"fxdef":true}],"transition":7,"n":"random effect"}
    }

  4. changed the title [-]Random colors via JSON API in Segment object like col:["r","r","r"][/-] [+]Random colors via JSON API in Segment object like "col":["r","r","r"][/+] on Oct 12, 2025
  5. blazoncek commented on Oct 12, 2025

    @blazoncek
    Contributor

    Please add this information to WLED Docs, so that official documentation is updated.

  6. AlexeyMal commented on Oct 12, 2025

    @AlexeyMal
    ContributorAuthor

    Added random colors option description in
    wled/WLED-Docs#275

    Still have to add the description of the whole trick of scrolling through all effects, palettes and colors at some place, will try

  7. AlexeyMal commented on Oct 18, 2025

    @AlexeyMal
    ContributorAuthor

    Hello Blaz,
    now I also added the random playlist example in
    wled/WLED-Docs#276
    So all is done for the docs from my point of view for the new feature.
    Please pull it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions