Skip to content

Using four colors in a gradient. #1073

Open

Description

@Astar75

Tell me how to use the fill gradient () function for four colors. I use it like this:

fill_gradient (leds, NUM_LEDS,
       rgb2hsv_approximate (currentGradient [0]),
       rgb2hsv_approximate (currentGradient [1]),
       rgb2hsv_approximate (currentGradient [2]),
       rgb2hsv_approximate (currentGradient [3]), SHORTEST_HUES);

Where:
currentGradient is an array with color.

With this use, only three colors are shown.

Activity

  1. kriegsman commented on Sep 4, 2020

    @kriegsman
    Member

    It looks like this should work, but something about it isn't giving you the output you expect. What are the values of the four RGB colors that you're passing in?

  2. added
    area: core
    status: stale
    status: triage
    on Apr 16, 2026
  3. github-actions commented on Sep 3, 2026

    @github-actions
    Contributor

    This issue was closed after 30 additional days without activity. If it is still relevant, please comment with current reproduction details or other actionable information and it can be reopened.

  4. zackees commented on Sep 3, 2026

    @zackees
    Member

    Reopening: this issue was closed automatically by a stale-bot run, not by a maintainer decision. That auto-close behavior was a mistake and has been disabled — FastLED issues will no longer be closed for inactivity. Apologies for the noise.

  5. reopened this on Sep 3, 2026
  6. removed
    status: stale
    on Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: corestatus: triage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions