Villhellm / lovelace-animated-background

Animated backgrounds for lovelace
191 stars 60 forks source link

[Feature Request] Allow configuring opacity of the background #49

Closed illuzn closed 6 months ago

illuzn commented 2 years ago

This is a feature request to adjust the opacity of the background. This is useful for dark themed backgrounds so that bright colours in the mp4 can be muted using opacity.

I've manually done this by editing line 488 of the js and adding in my desired opacity but it would be good if this could be done using the lovelace yaml configuration.

chrisborell commented 2 years ago

Could you please share the code you used?

illuzn commented 2 years ago

Sure, pretty simple.

In animated-background.js, change the following code block

      .bg-video{
          min-width: 100vw; 
          min-height: 100vh;
          opacity: XX%
      }

Where XX is a number from 0-100% corresponding to the opacity level.

Edit: This appears at line 485.