Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color wheel and speed of random colors effect #65

Open
iLLiac4 opened this issue Oct 8, 2018 · 1 comment
Open

Color wheel and speed of random colors effect #65

iLLiac4 opened this issue Oct 8, 2018 · 1 comment

Comments

@iLLiac4
Copy link

iLLiac4 commented Oct 8, 2018

Hi.

Adrilight works great. I would like to have a feature that would enable select color from color wheel as a static color and control the speed of random colors effect.

@iLLiac4 iLLiac4 changed the title Color wheel and speed of rainbow effect Color wheel and speed of random colors effect Oct 8, 2018
@Kaitoukid93
Copy link

I was enable to add a slider to select HUE from 0-255 and a on-off button to turn color transition
so you can select static color if you need or let them change automatically (rainbow switch on). just simple code
` for (int i = 0; i < UserSettings.LedsPerSpot; i++)
{
if (!UserSettings.SendRandomColors)
{
outputStream[counter++] = spot.Blue; // blue
outputStream[counter++] = spot.Green; // green
outputStream[counter++] = spot.Red; // red

                        allBlack = allBlack && spot.Red == 0 && spot.Green == 0 && spot.Blue == 0;
                    }
                    else
                    {
                        allBlack = false;
                        var n = UserSettings.zoecounter;
                        if (!UserSettings.rainbow)
                        {
                            var c = ColorUtil.FromAhsb(255, n, 1, 0.5f);
                            outputStream[counter++] = c.B; // blue
                            outputStream[counter++] = c.G; // green
                            outputStream[counter++] = c.R; // red
                        }
                        else
                        {
                            var k = frameCounter % 360;
                            var c = ColorUtil.FromAhsb(255, k, 1, 0.5f);
                            
                            outputStream[counter++] = c.B; // blue
                            outputStream[counter++] = c.G; // green
                            outputStream[counter++] = c.R; // red
                          
                        }
                        
                    }
                    }`

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

No branches or pull requests

3 participants