def METHOD_NAME(self):
    layer = self.layer
    if layer._selected_label == layer._background_label:
        self._set_color((1, 0, 0, 0))
    else:
        self._set_color(
            layer._selected_color.tolist()[:3] + [layer.opacity]
        )