Issue with colors while using L-System tubes

I have an L-system and I am hoping to combine the tube mode to generate a tree trunk, alongside custom geometry assembled in the L-system itself. I have this working, but as soon as the system encounters the leaf geometry, the tube loses it’s color and I’m unable to alter the color using other commands. A screenshot is below, you can see the trunk is brown for one branch, and then white on all branches after. Switching to skeleton mode, all branches are correctly colored, so it’s a difference between skeleton and tube mode.

Any advice would be appreciated!


My l-system is this:

context_ignore:F+-
premise:FFFA

A=!"[B]//[B]//[B]//[B]//[B]//[B]
B=!!!&F&F^F L(0.4,0.2)|L(0.3,0.3)| C A
C=%:0.5
F=F

L(i,j) = g(0)[& "(i) '(j) {.+f.+f.+f.|--f.+f.}]

I wasn’t able to generate color with your example oddly, but an easier approach might be to delete out the geometry based on type and color it directly.

Then you can color the trunk vs leaves as you wish:

Hope that helps,
Cheers,
Rob.