Don't know about automotive fuels. On the aviation side AVGAS is dyed by octane rating. One advantage is that the pilot/FE can easily tell if plane is fueled correctly during the pre-flight fuel test. Since this isn't normal for automotive applications I'd really never thought about it. Curious as to the answers though.