after a few tries, i found that if I didn't change the square thing to %e in the ANSI sequence, it would be able to grep the color info with [(%d)m in the pattern. But it can only handle one color seq ...
I'm having trouble figuring out how to grep the color of a word in a pattern. Say in a line of interest:
You picked up a bunch of .} {itemName=%1}
But how to get the color info of that item? Certain ...