A "Lookup - String" type attribute has been defined in the Task object. Values returned by this lookup have been used to define the display mapping colors. However, it is noticed that these colors are not displayed in the Task Timeline of the Modern UX.
Issue could not be reproduced in the version mentioned above.