The colors are supposed to be taken from the server. Not really sure if they never did for google tasks (Google (willingly or by accident) has a weird combination of CalDAV and proprietary APIs for calendar clients) or if this is a regression. In any case, color not coming from the server is a bug.
There have been also requests to be able to locally override colors for online calendars. This has not been implemented yet, but we'd like to add it.