def _get_annotate_background(self):
    self._check_camera_open()
    mp = self._camera.control.params[mmal.MMAL_PARAMETER_ANNOTATE]
    if (self._camera.annotate_rev == 3):
        if mp.enable_text_background:
            if mp.custom_background_color:
                return Color.from_yuv_bytes(mp.custom_background_Y, mp.custom_background_U, mp.custom_background_V)
            else:
                return Color('black')
        else:
            return None
    elif mp.black_text_background:
        return Color('black')
    else:
        return None
def _get_annotate_background(self):
    self._check_camera_open()
    mp = self._camera.control.params[mmal.MMAL_PARAMETER_ANNOTATE]
    if (self._camera.annotate_rev == 3):
        if mp.enable_text_background:
            if mp.custom_background_color:
                return Color.from_yuv_bytes(mp.custom_background_Y, mp.custom_background_U, mp.custom_background_V)
            else:
                return Color('black')
        else:
            return None
    elif mp.black_text_background:
        return Color('black')
    else:
        return None