Skip to content

Add line color hue shift speed#2

Merged
doersino merged 1 commit into
doersino:mainfrom
Crul:dev/crul
May 30, 2021
Merged

Add line color hue shift speed#2
doersino merged 1 commit into
doersino:mainfrom
Crul:dev/crul

Conversation

@Crul

@Crul Crul commented May 30, 2021

Copy link
Copy Markdown
Contributor

Added an option to dynamically change the hue of the line color.

Example of what can be done: https://i.imgur.com/18sMupc.png
Config for that example: #r580ro-0.9rot0.41rota0.59e0.995ex0.996t0.7se6700sk0.04i2000w1200h1200c10ca15can18l255li142lin78line0.49b6f788rotat822wa8508wav3015wavi1.3j0.3linec2hu0.42

Comments:

  • new hueshiftspeed option added at the bottom (following the guidelines)
  • option ranges (-10 to 10, step 0.1) chosen by eyeballing
  • changeHue function adapted from here https://stackoverflow.com/a/17433060
  • changeHue and auxiliary functions added bellow other auxiliary functions, between rotate and restartRendering
  • letter for the UI slider (ܘ) chosen at random from the (unused ones of the) Aramaic alfabet
  • performance wise, when hueshiftspeed != 0 it would be better to store the initial color value as HSL to avoid the RGB->HSL conversion each step. Or even avoiding RGB and specifying the value as hsla(...). I didn't see it worth the effort.

@Crul Crul force-pushed the dev/crul branch 2 times, most recently from ddd4c98 to 41d11ff Compare May 30, 2021 13:07

@doersino doersino left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition! It creates a very psychedelic (or, pro-LGBT) vibe, which is interesting to play around with.

I've pointed out a few very minor issues (this is my first time trying out GitHub's built-in code review tooling), but it's honestly a great pull request! Thank you very much.

Comment thread script.js Outdated
Comment thread script.js Outdated
Comment thread script.js Outdated
@doersino

doersino commented May 30, 2021

Copy link
Copy Markdown
Owner

Awesome, thank you so much for addressing my nitpicky requests for changes!

I'll go through the presets and check which ones can be improved with a subtle hue shift.

@doersino doersino merged commit f0a5c39 into doersino:main May 30, 2021
@Crul

Crul commented May 30, 2021

Copy link
Copy Markdown
Contributor Author

Yeah, I preferred not to touch the presets, it is better that you choose the values you like, my taste for colors is not the most refined in the world.

Thanks!

@doersino

Copy link
Copy Markdown
Owner

Made a small change, hope you don't mind. 😉

Screenshot 2021-05-30 at 20 40 40

@Crul

Crul commented May 30, 2021

Copy link
Copy Markdown
Contributor Author

Haha, it fits perfectly!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants