def _set_color_effects(self, value):
    self._check_camera_open()
    if (value is None):
        enable = mmal.MMAL_FALSE
        u = v = 128
    else:
        enable = mmal.MMAL_TRUE
        try:
            (u, v) = value
        except (TypeError, ValueError) as e:
            raise PiCameraValueError(('Invalid color effect (u, v) tuple: %s' % value))
        if (not ((0 <= u <= 255) and (0 <= v <= 255))):
            raise PiCameraValueError('(u, v) values must be between 0 and 255')
    mp = mmal.MMAL_PARAMETER_COLOURFX_T(mmal.MMAL_PARAMETER_HEADER_T(mmal.MMAL_PARAMETER_COLOUR_EFFECT, ct.sizeof(mmal.MMAL_PARAMETER_COLOURFX_T)), enable, u, v)
    self._camera.control.params[mmal.MMAL_PARAMETER_COLOUR_EFFECT] = mp
def _set_color_effects(self, value):
    self._check_camera_open()
    if (value is None):
        enable = mmal.MMAL_FALSE
        u = v = 128
    else:
        enable = mmal.MMAL_TRUE
        try:
            (u, v) = value
        except (TypeError, ValueError) as e:
            raise PiCameraValueError(('Invalid color effect (u, v) tuple: %s' % value))
        if (not ((0 <= u <= 255) and (0 <= v <= 255))):
            raise PiCameraValueError('(u, v) values must be between 0 and 255')
    mp = mmal.MMAL_PARAMETER_COLOURFX_T(mmal.MMAL_PARAMETER_HEADER_T(mmal.MMAL_PARAMETER_COLOUR_EFFECT, ct.sizeof(mmal.MMAL_PARAMETER_COLOURFX_T)), enable, u, v)
    self._camera.control.params[mmal.MMAL_PARAMETER_COLOUR_EFFECT] = mp