The error message is tell you exactly what's going on.
setColor has been deprecated, meaning it was replaced by something else.
Quickly checking
the documentation will unveil that we now have setFillColor as replacement.
If you still want to use the old setColor function, you'll have to adjust your project configuration to not threat deprecations as error.