code: function compositeRGB(foreground, background) {
    const [fr, fg, fb, fa] = chroma(foreground).rgba()
    const [br, bg, bb] = chroma(background).rgb()
    return chroma([(1 - fa) * br + fa * fr, (1 - fa) * bg + fa * fg, (1 - fa) * bb + fa * fb]).css()
  }
docs: Composite ("flatten") a foreground RGBA value with an RGB background into an
  RGB color for the purposes of measuring contrast or luminance.