fn validate(gradient: &Gradient) -> Result<(), Paint>
Returns a fallback paint in case the gradient is invalid.
The paint will be either black or contain the color of the first stop of the gradient.