Skip to content

dustin-archive/layer-colors-scss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

layer-colors-scss

layer transparent colors

Installation

$ npm install --save layer-colors-scss

Usage

layer-colors($above, $below)

Outputs a color from two colors as if they were layered in Photoshop or a browser.

The resulting color is not an average.

layer-colors(rgba(dodgerblue, 0.25), rgba(orange, 0.75))
// => rgba(143, 155, 128, 0.8125)

For comparison here is the result of mix()

mix(rgba(dodgerblue, 0.25), rgba(orange, 0.75))
// => rgba(199, 160, 64, 0.5)