Design comparison
Solution retrospective
In this project I trained flexbox with different flex directions, depends on moblie or desktop version. The trickiest part of this project was adding purple filter on hero image. The best way I found is making a purple background with higher z-index than photography, and make it opacity. To be honest, I am not really delight of result I achieved, maybe is the better way to do this? It is quite different color than challenge template
Maybe some another ideas?
Community feedback
- @correlucasPosted over 2 years ago
👾Hello Jakub, congratulations for your solution!
-- >Answering your question about the color overlay effect:
I had the same question when I did this challenge, and to reach the color effect I found 3 ways to do that:
1.👾The most obvious way was try to match the purple color blending the background and the image playing with the img opacity, you can get close to the color but doesn't match due some contrast issues, opacity isn't enough. The way you've done.
.................
2.👾Using filter one online tool to calculate the filter for the purple color overlay on the image and using it to blend, this works but doesn't match the image. Anyway this tool for filter generation is good to apply hover effects changing svg colors without a need to transform them into path, take a look:
Filter code for the purple color:
filter: invert(48%) sepia(22%) saturate(2034%) hue-rotate(235deg) brightness(90%) contrast(89%);
--> See the filter calculator here: https://codepen.io/sosuke/pen/Pjoqqp
.................
3.👾The proper solution to do the effect overlay on the image, using mix-blend-modes. Just apply theses properties to the img / picture. Code below:
img {mix-blend-mode: multiply; opacity: 0.75; }
More about mix-blend-mode here:
https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode
.................
I hope it helps you to fix the image overlay bro, happy coding!
1@abuk111Posted over 2 years ago@correlucas Thank you for your answer! I tried filters with online tool, but IMO the result was much far than I expected. Using mix-blend-modes gives perfect effect! Thank tou for your tip! I really appreciated it!
1@correlucasPosted over 2 years ago@abuk111 hey Jabuk, happy to hear that worked for you 🤓 happy coding
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