New to pixel Blaze starting to get a basic understanding of some of the values but long way away from coding any type of effects. All the patterns are awesome after spending close to \$150 on crappy LED controllers. Pixelblaze blows them all out of the water. Just wondering if there was a way to limit some of the patterns to certain hues. Lights are on my car and I can’t be rocking pinks and light purples. So a hue range of “0-.65“

2 Likes

You can pretty easily modify any pattern…

If it’s using HSV, then limiting the H is your goal.

This will vary by pattern, but if the pattern has

`hsv(h,s,v)`

You can change it to something like this:

`hsv(h%.65,s,v)`

The %.65 is mod .65, so it’ll roll over to 0 and start back toward .65 again.

Another method would be adding a line just before the HSV call, like:
`if (h > .65) { h = h%.65}`
If the rollover looks weird (many hue patterns assume a rollover at 1 to 0, which are both red, and you’re going from blue back to red… And then another abrupt change if they stop at 1, since that’s just .35 (greenish) back to 0 (red))
Then you could do:
`if (h > .65) { h = .65 - ((h-.65)/.35)*.65}`
That will smoothly reverse back to red for the last third of 0…1 so you’ll have a red to blue change then a blue to red change which is only half as long/wide.

1 Like

### Adapting a rainbow pattern to two colors not adjacent on the hue wheel

2 Likes

Thank you guys for the quick response! Cant wait to do some more tinkering when i get off work.

4 Likes

Of course my phone camera does very little Justice to how cool the lights are but you guys get the idea.

1 Like