packageDocumentation module import { ColorDef } from "@itwin/core-common" ; internal export function getCSSColorFromDef ( colorDef ) { const { b , g , r , t } = colorDef . colors ; let rgbaString = "" ; if ( t === 0 ) rgbaString = `rgb(${ r },${ g },${ b })` ; else { const alpha = ( ( 255 - t ) / 255 ) . toFixed ( 2 ) ; rgbaString = `rgba(${ r },${ g },${ b },${ alpha })` ; } return rgbaString ; }