color-composite
Composite semitransparent colors.
const composite = const out = console// => { space: 'rgb', values: [116, 82, 57], alpha: 0.657 }
Install
npm i color-composite
Usage
composite([ top, ..., bottom ])
Composite an array of colors from top
to bottom
into one color.
Takes color strings or objects as input. Returns a color object.
const composite = // => { space: 'rgb', values: [116, 82, 57], alpha: 0.657 }
over(a, b)
Compsites color A over color B.
Takes color strings or objects as input. Returns a color object.
const over = // => { space: 'rgb', values: [156, 166, 255], alpha: 0.875 }
Made from the Alpha compositing "over operator" on Wikipedia.