import { transSketchColor } from '../../../common/utils' ; import { SKLayer , SKFillItem , Background } from '../../../types' ; export default ( fillStyle , layer ) : Background => { let { alpha , red , green , blue } = fillStyle . color ; if ( layer . style && layer . style . contextSettings ) { alpha = layer . style . contextSettings . opacity * alpha ; } if ( alpha > 0 ) { return { color : transSketchColor ( { red , green , blue , alpha } ) , } ; } return { } ; } ;