def _set_annotate_foreground(self, value):
    self._check_camera_open()
    if (not isinstance(value, Color)):
        raise PiCameraValueError('annotate_foreground must be a Color')
    elif (self._camera.annotate_rev < 3):
        if (value.rgb_bytes != (255, 255, 255)):
            warnings.warn(PiCameraFallback('Firmware does not support setting a custom foreground annotation color; using white instead'))
        return
    mp = self._camera.control.params[mmal.MMAL_PARAMETER_ANNOTATE]
    mp.custom_text_color = True
    (mp.custom_text_Y, mp.custom_text_U, mp.custom_text_V) = value.yuv_bytes
    self._camera.control.params[mmal.MMAL_PARAMETER_ANNOTATE] = mp
def _set_annotate_foreground(self, value):
    self._check_camera_open()
    if (not isinstance(value, Color)):
        raise PiCameraValueError('annotate_foreground must be a Color')
    elif (self._camera.annotate_rev < 3):
        if (value.rgb_bytes != (255, 255, 255)):
            warnings.warn(PiCameraFallback('Firmware does not support setting a custom foreground annotation color; using white instead'))
        return
    mp = self._camera.control.params[mmal.MMAL_PARAMETER_ANNOTATE]
    mp.custom_text_color = True
    (mp.custom_text_Y, mp.custom_text_U, mp.custom_text_V) = value.yuv_bytes
    self._camera.control.params[mmal.MMAL_PARAMETER_ANNOTATE] = mp