I'm working on a new personal website. For the homepage header I made a soothing waves animation using the colors of my new theme.
Problem: this animation seems to be quite heavy and is jagged/stuttery on lower-end devices like mid-range smartphones and cheap laptops. Not a desirable effect for a homepage or any website for that matter.
The animations are done by animation background-position on the wave elements and subtle movements with css transform animations (translate, rotate).
What I've tried so far:
- turning the animation into a lightweight video. Problem: color reproduction across browsers is a mess. The green on the bottom and the blue on top needs to match up with the background of the page, which is impossible to do across all major browsers (I tried using css filters to correct the differences in color interpretation but unfortunately this also isn't satisfactory).
- Using the will-change css property on the animating elements. This doesn't make a noticible difference but I still leave them in to be sure.
- Using a javascript animation library to do the heavy animation lifting, but this produces a similarly heavy result.
- Rendering the video to a html5 canvas. This still produces the same color misinterpretation.
- Contemplating life and why the world in 2020 is still like this that there's no regulation on color reproduction between browsers and devices. This obviously did not produce a useable result.
Conclusion: I'm open to any input on making the animations be less recource-intensive, I'd prefer keeping the live-rendering version like it is now, but if there's a solution to the color interpretation issue in html5 I'll gladly switch to using that method as it tends to be the easiest on end-user resources.