docs: function getContrastColor(bgColor, colors) {
    // We set a rather high cutoff to prefer light text if possible.
    const cutoff = 0.74;
  
    // Calculate the perceived luminosity (relative brightness) of the color.
    const perceivedLuminosity = Color(bgColor).luminosity();
  
    return perceivedLuminosity >= cutoff ? colors.dark : colors.light;
  }