The task bar color will change instantly to your selection. If you are in Card View, the color palette will appear immediately after you right-click on the task bar.
(Depending on your view, this is either: an individual Gantt bar, or calendar event bar, vertical color bar on a card) Task bars are the bars that are displayed horizontally in Gantt and Calendar Views, and vertically on the left side of cards in Card View.
The sheet owner and shared collaborators with Editor or Admin access to a sheet can manually change the color the t ask bar.