This how to assumes that you have already opened a gpx or kml file in GPX Viewer which contains at least one track or route. If you haven't opened it yet here is How to open gpx or kml file. Please note that track/route custom colors are not saved, but cached, so if you clean Opened files cache in Clear cache data in Miscellaneous Settings these settings for track/route custom colors will be deleted.
Below are step-by-step instructions on how to change the track/route custom color. Also for this custom color to work, you need to have Settings - Track/route - Color from file option enabled.
Below is a video showing the instructions above: