Rezmason / matrix

matrix (web-based green code rain, made with love)
https://rezmason.github.io/matrix
MIT License
3.29k stars 212 forks source link

Feature request: Specify color palette in URL #26

Closed Avaray closed 1 year ago

Avaray commented 1 year ago

Passing RGB color for Background as URL variable would be cool.

Rezmason commented 1 year ago

You can! But it's additive, so bright and light background colors wash out the raindrops...

http://localhost:8000/?version=resurrections&backgroundColor=1,0.5,0

image

Hm! I'm surprised by how well that one turned out. 🎃🎃🎃

But honestly, this stinks, no one wants this to be how it works. So I think I should add a color palette URL variable, that'll give you a lot more control. I'll update the title of the ticket to reflect that.

And one day a GUI will make all this a lot more pleasant. 🤞

Rezmason commented 1 year ago

Planned syntax:

&palette=r,g,b,at,r,g,b,at,r,g,b,at (alias paletteRGB) &paletteHSL=h,s,l,at,h,s,l,at,h,s,l,at Add to config: isPaletteHSL: true

Rezmason commented 1 year ago

@Avaray All right, I'm calling this one "alphabet soup":

0.5,0.05,0,0, is a tomato soup RGB color at 0% 1,0.7,0,0.8, is medium orange RGB color at 80% 1,1,0.5,1 is a pale yellow RGB color at 100%

https://rezmason.github.io/matrix/?palette=0.5,0.05,0,0,1,0.7,0,0.8,1,1,0.5,1&cursorColor=0,0,0&width=30&animationSpeed=0.2

image I liked the Halloween one better. Either way, the palette URL variable has been added, and that's pretty much 100% user controlled colors now. In the readme you'll also see there are HSL (hue, saturation, lightness) variants of all the color settings.

Thanks for being a fan!

Avaray commented 1 year ago

Cool, thank you :)