@staticmethod
def _blend_color_opacity(color, opacity):
    """ Blend color with white to simulate opacity

        Args:
            color (:obj:`int`): color (0-0xffffff)
            opacity (:obj:`int`): opacity (0-0xff)

        Returns:
            :obj:`int`: blended color
        """
    r = color >> 16
    g = color - r * 2 ** 16 >> 8
    b = color - r * 2 ** 16 - g * 2 ** 8
    w = 255
    r_opaque = round((r * opacity + w * (255 - opacity)) / 255)
    g_opaque = round((g * opacity + w * (255 - opacity)) / 255)
    b_opaque = round((b * opacity + w * (255 - opacity)) / 255)
    return (r_opaque << 16) + (g_opaque << 8) + b_opaque
