Рубрики

colors

What colors mixed together create black?

This page was last modified on Feb 21, 2023 by MDN contributors.


background-blend-mode

The background-blend-mode CSS property sets how an element’s background images should blend with each other and with the element’s background color.

Blending modes should be defined in the same order as the background-image property. If the blending modes’ and background images’ list lengths are not equal, it will be repeated and/or truncated until lengths match.

Syntax

/* One value */ background-blend-mode: normal; /* Two values, one per background */ background-blend-mode: darken, luminosity; /* Global values */ background-blend-mode: inherit; background-blend-mode: initial; background-blend-mode: revert; background-blend-mode: revert-layer; background-blend-mode: unset; 

Values

The blending mode to be applied. There can be several values, separated by commas.


Formal definition

Initial value normal
Applies to All elements. In SVG, it applies to container elements, graphics elements, and graphics referencing elements.. It also applies to ::first-letter and ::first-line .
Inherited no
Computed value as specified
Animation type Not animatable

Basic example

.item  width: 300px; height: 300px; background: url("image1.png"), url("image2.png"); background-blend-mode: screen; > 

Try out different blend modes

div id="div">div> select id="select"> option>normaloption> option>multiplyoption> option selected>screenoption> option>overlayoption> option>darkenoption> option>lightenoption> option>color-dodgeoption> option>color-burnoption> option>hard-lightoption> option>soft-lightoption> option>differenceoption> option>exclusionoption> option>hueoption> option>saturationoption> option>coloroption> option>luminosityoption> select> 
#div  width: 300px; height: 300px; background: url("br.png"), url("tr.png"); background-blend-mode: screen; > 
.getElementById("select").onchange = (event) =>  document.getElementById("div").style.backgroundBlendMode = document.getElementById("select").selectedOptions[0].innerHTML; >; console.log(document.getElementById("div")); 


The Science of Color

Can you find the animal hiding in this image? Camouflage uses color to conceal forms by creating optical illusions. American artist Abbott Thayer introduced the concept of disruptive patterning, in which an animal’s uneven markings can disguise its outline. In this illustration Thayer shows how a peacock can disappear into its surroundings.

Thayer, an American artist, devoted much of his life to understanding how animals conceal themselves in nature for survival. In his book, Concealing Coloration in the Animal Kingdom, Thayer presented his beliefs of protective coloration as an essential factor in evolution helping animals disguise themselves from predators. He received much praise and criticism. He was extreme in his views arguing that all animal coloration was for protective purposes and failing to recognize other possible reasons such as sexual selection – characteristics for attracting a mate. Teddy Roosevelt most notably attacked his theories by pointing out that this concealment doesn’t last all season, or even all day, but was dependent on a single frozen moment in times. Despite these shortcomings, Thayer went on to be the first to propose camouflage for military purposes. Although his suggestions were initially rejected, his former students were among the founders of the American Camouflage Society in 1916 and his theories were eventually adopted and are still used today.

Albatross D.Va, 1917-1918
Courtesy of the National Air and
Space Museum

The colorful pattern on this German aircraft from World War I is called lozenge camouflage. Its disruptive pattern applied Abbott Thayer’s theories in an effort to inhibit enemy observation from the air and on the ground.

Colin Wynn
the authorColin Wynn

Leave a Reply