Perfetto has no option to specify colors, but instead hashes the name into reasonable colors to differentiate blocks. The Pix API should offer something similar. Since there is none, most pass a constant color to each Begin/EndEvent. "Wait" could also be special cased to highlight in red.
https://github.com/google/perfetto/blob/0c893ed6bf6b42e3fee58daf3380d301c72550ed/ui/src/components/colorizer.ts#L4