The RGB values I’m using are correct, but I can’t get the alpha right and the color seems more saturated in the photo than what I can accomplish. Someone mentioned the use background-blend-mode, but I am not familiar with the use of it.
So basically we’re duplicating the background image and settings and applying them to the container to make this work. Seems rather a redundant method to make that work–loading the background image twice. But that is the way it seems to be implemented.
As of today, background-blend-mode still isn’t supported in IE or the new Edge. But I’ll use this and then look into finding a jQuery method, if required.
You won’t load the image twice It’s loaded once and then available in cache for as many elements as you like.
It looks mix-blend mode will blend with a parents background but it also affects the text.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
html, body {
margin:0;
padding:0
}
section {
background:url(http://nettra.net/demo-sites/tpt/development/wp-content/themes/tempestcorp/img/tempest-tech-ifcf.jpg) no-repeat fixed 50% 50%;
background-size:cover;
padding:1px;
}
.mix {
width:300px;
height:300px;
margin:100px;
position:relative;
mix-blend-mode:multiply;
background:red;
color:#fff;
}
</style>
</head>
<body>
<section>
<h1>Test</h1>
<div class="mix"><p>This is a test This is a test This is a test This is a test This is a test</p> </div>
</section>
</body>
</html>
I haven’t really played with this enough yet to work out all the intricacies.