dustin-archive / layer-colors-scss

compose multiple colors with alpha channels into one

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

About

compose multiple colors with alpha channels into one

License:MIT License


Languages

Language:CSS 100.0%