To easily add color to timeline items on Asana, indeed, you need to create custom fields (type Single-select) and set a color for each option of the field.
Then, when you associate a custom field value with a task, the relevant color appears on your timeline.
To set the colors for your timeline, click the Color button in the toolbar (top right), then choose your preferences from the drop-down menu. You can choose to use the default Asana colors or define your own color scheme using the custom fields. Once you’ve chosen the custom field you want to use, you can save the view for everyone. This way, your team benefits from the same color scheme when they view the project in timeline view.
More resources about this topic: