From 55e988d1dc56cb4c4c72dd409ce9312ae8825619 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Tue, 3 Nov 2020 12:58:57 +0700 Subject: [PATCH] add preserving alpha in chrome while changing other values --- src/components/chrome/ChromeFields.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/chrome/ChromeFields.js b/src/components/chrome/ChromeFields.js index c1e27349..bcbadb69 100644 --- a/src/components/chrome/ChromeFields.js +++ b/src/components/chrome/ChromeFields.js @@ -55,6 +55,7 @@ export class ChromeFields extends React.Component { r: data.r || this.props.rgb.r, g: data.g || this.props.rgb.g, b: data.b || this.props.rgb.b, + a: this.props.rgb.a, source: 'rgb', }, e) } else if (data.a) { @@ -87,6 +88,7 @@ export class ChromeFields extends React.Component { h: data.h || this.props.hsl.h, s: Number(!isUndefined(data.s) ? data.s : this.props.hsl.s), l: Number(!isUndefined(data.l) ? data.l : this.props.hsl.l), + a: this.props.rgb.a, source: 'hsl', }, e) }