/**
 * Copyright (c) Nicolas Gallagher.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */ import isWebColor from '../isWebColor' ; import processColor from '../../exports/processColor' ; const normalizeColor = ( color ? , opacity = 1 ) : undefined | number [ ] => { if ( color == null ) return ; if ( typeof color === 'string' && isWebColor ( color ) ) { return ; } const colorInt = processColor ( color ) ; if ( colorInt != null ) { const r = ( colorInt >> 16 ) & 255 ; const g = ( colorInt >> 8 ) & 255 ; const b = colorInt & 255 ; return [ r , g , b ] ; } } ; export default normalizeColor ;