# Coloring strands in braids

Is there an option, or simple work-around, for coloring each strand in a three-dimensional BraidImage differently? For instance, I'd like to render a braid image such as

KnotData[{4, 1}, "BraidImage"]


in red, green and blue.

• it's a hack, but i = 1; KnotData[{4, 1}, "BraidImage"] /. {y_GraphicsComplex} :> {{Red, Green, Blue}[[i++]], y} – Jason B. Nov 7 '17 at 22:46
• @JasonB. Great solution! – Henrik Schumacher Nov 7 '17 at 22:48
• Jason: Indeed, perfectly acceptable solution (+1). You can post it as a full solution and if I don't receive a superior solution in a day or so, I'll accept yours. – David G. Stork Nov 7 '17 at 22:50

Dunno if it's any better than @Jason B.'s answer, but I think "BraidImageData" gives you the graphics objects used in the image, which you can play around with as so, for example:

knotdata = KnotData[{4, 1}, "BraidImageData"];
colors = {Red, Blue, Green};

Graphics3D[
Transpose@{colors, knotdata},
Boxed -> False,
ViewPoint -> Front
]


• Anne: Excellent. Thanks (+1). I'll wait a day or two to accept either this, Jason's or (possibly) someone else's. – David G. Stork Nov 7 '17 at 22:57
• Great! This is the right way to do it, my solution was just a hack. – Jason B. Nov 8 '17 at 1:57