Page 1 of 1

50 Shades of . . . Green?

50 Shades of . . . Green?

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
Examples: "MacOS X - Your question", "MS Word - Your Tip or Trick".

Please note that switching to another language when reading a post will not work!
Posts will not have a translated counterpart.




RSS Feed

Home Forums Hardware Arduino 50 Shades of . . . Green?

This topic contains 3 replies, has 2 voices, and was last updated by  hans 6 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • 7805

    ohno
    Participant

    I have LEDs on the front of my house that I would like to use to light up with holiday themes.  Next up is a St. Patricks day led theme.
    I have setup my arduino to run the Bouncy Balls effect, and I would like to use different shades of green for each ball.

    I edited the code for the colors, using the color picker given on this site.
      byte colors[4][3] = { {0, 0xff, 0},
                            {0, 0x88, 0},
                            {0, 0x55, 0},
                            {0, 0xcc ,0} };

      BouncingColoredBalls(4, colors);

    The expected result was 4 balls with 4 different shades of green.  The actual result was 4 bouncy balls, all with the same green color.  The different shades of green shown in the color picker, do not show up on my WS2812B leds. 
    I have noticed that using the colors by name in the FastLED library gives the same problem.  Eg.  DarkGreen looks identical to Green and is also the same as LightGreen.

    7809

    hans
    Keymaster

    Hi Ohno,

    after reading your other post; please post pictures when you’ve got everything working … I’d be very interested in seeing this! 

    Coming back to your color problem, I assume you based this on the MultiColor Bouncing Balls (just adding the link here for others as a reference).

    Could you post the full code here? So I can give it a try on my end.
    One thing with LEDs, since you’re basically are playing with only the GREEN parameter of an RGB color: The colors will look very similar, and some might not even be detectable by human eyes. Test 4 very different colors and confirm that this indeed is using different colors.
    If so … try different green variants, for example (I did not test these – but Red and Blue will have an impact on the brightness and kind-of green):

      byte colors[4][3] = { {0, 0xff, 0}, 
                            {0x4D, 0x88, 0x50}, 
                            {0xD0, 0x80, 0x00}, 
                            {0x30, 0xcc ,0x30} };

    just changing the GREEN parameter might not be enough to make them look different.

    Let me know how this works … 

    7891

    ohno
    Participant

    I couldn’t figure out how to make olive green (dark green), it just doesn’t translate from the color charts to the LEDs.

    Its possible to make a blue-green and a yellow-green but it seems those are the only choices.  If anyone knows how to make another green, I am curious.

    For St Patricks day, I have got 4 different enough greens to work nicely with the bouncy ball effect. 

    byte colors[4][3] = { {0, 0xff, 0},

                                    {0x45, 0xee, 0x00},

                                    {0x00, 0xff, 0x20},

                                    {0x40, 0xee, 0x10} };

    BouncingColoredBalls(4, colors);

    7893

    hans
    Keymaster

    Hi Ohno!

    One of the downsides of LEDs is that proper color matching can be quite the challenge haha … Especially with 50 shades of green .

    I’d play with much lower values for the green, for example:

    0x00, 0xff, 0x00 // bright green
    0x00, 0x50, 0x00 // darker green

    I don’t have a LED strand with me right now (I’m at work), so I can test any of these. I did notice however, when I was trying to make the faded colors around the bouncing balls, that I’d have to go pretty low before I would see the difference. For example the difference 0xFF for green versus 0xAA is hardly visible, if visible at all.

Viewing 4 posts - 1 through 4 (of 4 total)



You must be logged in to reply to this topic.