tholman / cursor-effects

Old-school cursor effects for your browser built with modern JavaScript
https://tholman.com/cursor-effects
3.45k stars 254 forks source link

Following Dot custom color #35

Closed ZTF666 closed 2 years ago

ZTF666 commented 2 years ago

I had the pleasure of implementing the trailing effect for one of our internal demos for a product and i got asked the following question so often : 'is it possible to change the color of the dot ?' , so i decided to make it happen lol . I added a couple of lines to make custom colors possible for the following dot . Cheers ,ZTF

tholman commented 2 years ago

Nice! Looks like the default color maybe doesn’t have its opacity any more though, fix that up and I’ll merge in!

ZTF666 commented 2 years ago

Thank you ! Correct me if i'm wrong , the opacity can be set through the hex value of the color if needed !? if i recall, the hex color representation does support the addition of an alpha value i.e : #RRGGBBAA . So if for example if i choose a black color : #141414 i can add opacity to it by doing something like : #14141450 , thus making the dot have its opacity if needed .

tholman commented 2 years ago

Right! The old default was rgba(50, 50, 50, 0.65) and in this PR its #5b5b5b, would like to keep that opacity on the default either as rgba(50, 50, 50, 0.65) or the hex with the alpha

ZTF666 commented 2 years ago

Alright ! it has been done , thank you for the feedback 🙌.

tholman commented 2 years ago

Thanks! Will do the npm deploy when i get a minute, but this is all great.

ZTF666 commented 2 years ago

Thank you ! cheers 🎊