def apply_style(
        self, style: Styles, *, style_name: Optional[str] = None
    ) -> str:
        """Apply the given style to a particular value."""
        exposed_color = self.value[style]
        if style is Styles.PIE:
            assert style_name is not None
            shade = PIE_STYLE_TO_SHADE[PieStyle(style_name)]
            return get_color(exposed_color, shade)
        else:
            return exposed_color
Apply the given style to a particular value.
httpie/output/ui/palette.py