import color from 'color' ; export const darken = ( inputColor , amount ) => { const colorValue = color ( inputColor ) ; const lightness = colorValue . lightness ( ) ; return colorValue . lightness ( lightness - lightness * amount ) . hex ( ) ; } ; export const lighten = ( inputColor , amount ) => { const colorValue = color ( inputColor ) ; const lightness = colorValue . lightness ( ) ; return colorValue . lightness ( lightness + ( 100 - lightness ) * amount ) . hex ( ) ; } ; export const alpha = ( inputColor , amount ) => { return color ( inputColor ) . alpha ( amount ) . toString ( ) ; } ; export const mix = ( baseColor , mixColor , amount ) => { const baseColorValue = color ( baseColor ) ; const mixColorValue = color ( mixColor ) ; return baseColorValue . mix ( mixColorValue , amount ) . hex ( ) ; } ; export const rem = ( pxValue , baseFontSize = 16 ) => `${ Number . parseFloat ( pxValue ) / baseFontSize }rem` ; export const pxFromRem = ( remValue , baseFontSize = 16 ) => `${ Number . parseFloat ( remValue ) * baseFontSize }px` ; export const outline = ( baseColor , width = 3 ) => ( { boxShadow : `0 0 0 ${ width }px ${ alpha ( baseColor , 0.48 ) }` } ) ; export const remToNumber = ( value ) => Number . parseFloat ( value ) ; export { default as addClassesToChildren } from './add-classes-to-children' ; export * from './types' ;