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'; };