opacity handling

This commit is contained in:
Henry Jameson 2020-01-16 20:53:05 +02:00
parent c3cd66335f
commit f16ec75c70
4 changed files with 149 additions and 126 deletions

View file

@ -159,7 +159,7 @@ export const hex2rgb = (hex) => {
* @returns {Object} result
*/
export const mixrgb = (a, b) => {
return Object.keys(a).reduce((acc, k) => {
return 'rgb'.split('').reduce((acc, k) => {
acc[k] = (a[k] + b[k]) / 2
return acc
}, {})