58 43 parts
Keith Randall's idea of first converting the input to unary was pretty good, so I stole it. ;-) Conveniently, I'd just spent some time optimizing small binary-to-unary converters in Manufactoria, so just picked one of my almost-working solutions* from that challenge and combined it with a quickly optimized mod-7 counter.
This design is now at the point where just getting the robots from the top to the bottom is starting to require otherwise useless extra conveyors. Any significant further parts reductions will probably come from redesigning the layout to be taller and narrower.
(* That challenge required a) the design to fit onto a 7×7 board, and b) the unary output to be in red markers. If you look at the binary-to-unary converter part of the machine above, you'll note that, with one or two extra parts, it can easily satisfy either requirement, but alas, not both.)
Here's the previous 58-part version:
Like Jan Dvorak's solution, this is also based on a 7-state FSM. I've labeled the gates corresponding to each state in the screenshot to make it easier to read. The state machine itself, however, is really the easy part; the tricky part is generating the final output with a minimal number of gates.
One trick I found useful was the final copy loop that barrel-shifts everything written before the yellow marker to the end (while also stripping off the green marker): this allowed me to make use of the repetition in the high-order output bits by generating the outputs as:
0: Y ->
1: BY -> B
2: YBR -> BR
3: YBB -> BB
4: RYBR -> BRR
5: BYBR -> BRB
6: RYBB -> BBR
This lets me mostly combine the output paths for outputs 2, 4 and 5 (which all begin with
BR) and 3 and 6 (which begin with