Design comparison
Solution retrospective
I don't know, how to change color of image in hero banner.
Community feedback
- @DeusMalsithPosted over 3 years ago
You can change the color using the filter rule. You'll need to initialize it with sepia though in order to change the color with hue rotate.
https://developer.mozilla.org/en-US/docs/Web/CSS/filter
You could probably also use the ::before or ::after pseudo-elements to create a transparent color over the image. But you'd still need to use filter in order to get your brightness and contrast close to the design.
1@paulyd33Posted over 3 years agoAdd a transparent overlay to the image itself, eg
img { background: rgba(255, 255, 255, 0.5), url('location/to/image.jpg)' }
This will add a white overlay with 50% transparency
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord