Tasker must be restarted to get new Material You Colors
If the system Material You colors are changed (ie. wallpaper is changed), the Tasker theme doesn't reflect the change and keeps the previous theme. This applies also to the "Get Material You Colors" action, it'll get the previously used colors and not the new ones.
Force closing and reopening Tasker allows it use the new colors, until the wallpaper is changed again.