import { colorsService } from 'services' ; param { Record < string , unknown > } colors returns { Record < string , unknown > } example export function schemeToRgb ( colors ) { const { hexToRgb } = colorsService ( ) ; const rgb = Object . entries ( colors ) . reduce ( ( acc , current ) => { const [ key , color ] = current ; const rgb = hexToRgb ( String ( color ) ) ; Object . assign ( acc , { [ key ] : rgb , } ) ; return acc ; } , { } ) ; return rgb ; }