I am trying to color bars based on the values of a categorical variable

As described here: https://www.stata.com/statalist/archive/2011-03/msg00098.html

Code:
sysuse auto, clear
gr hbar weight, over(foreign) bar(1, color(black)) bar(2, color(gs8))
Does not have the desired effect, while

Code:
sysuse auto, clear
gr hbar weight, over(foreign) asyvars bar(1, color(black)) bar(2, color(gs8))
Does, but also changes the format of the graph.

Is there an alternative solution that simply allows me to specify the colors?