import { Color } from './color' ; export function hexString ( n ) { return Math . max ( 0 , Math . min ( 255 , Math . round ( n ) ) ) . toString ( 16 ) . padStart ( 2 , '0' ) ; } export function hexColorString ( color ) { return `#${ color . map ( hexString ) . join ( '' ) }` ; } export function linearGradient ( stops ) { return `linear-gradient(${ stops . join ( ',' ) })` ; }