From d4a0b7ea189c46deb261209ba563afd451aee678 Mon Sep 17 00:00:00 2001 From: ajayadav09 Date: Thu, 22 Feb 2024 18:42:31 +0530 Subject: [PATCH] fix lint --- .../ImageUploader/components/ImageUploaderWithText/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OnboardingSPA/components/ImageUploader/components/ImageUploaderWithText/index.js b/src/OnboardingSPA/components/ImageUploader/components/ImageUploaderWithText/index.js index d5e237244..0123832d8 100644 --- a/src/OnboardingSPA/components/ImageUploader/components/ImageUploaderWithText/index.js +++ b/src/OnboardingSPA/components/ImageUploader/components/ImageUploaderWithText/index.js @@ -71,7 +71,7 @@ const ImageUploaderWithText = ( { image, imageSetter } ) => { const getContrastingColor = ( color ) => { /* if the contrast value more than 150 it should have black bg, otherwise white */ const [ r, g, b ] = color.match( /\d+/g ).map( Number ); - const contrastValue = 0.2126 * r + 0.7152 * g + 0.0722 * b; + const contrastValue = ( 0.2126 * r ) + ( 0.7152 * g ) + ( 0.0722 * b ); return contrastValue > 160 ? 'black' : 'white'; };