If you use the Repeat option described here:
https://forum.plantuml.net/5826/please-provide-action-repeat-loop-start-instead-condition?show=5826#q5826
:A;
repeat: #RED:B;
repeat while (C)
:D;
#RED: is not interpreted, whereas
:A;
repeat
#RED:B;
repeat while (C)
:D;
The colour is shown properly but a diamond appears at the start of the repeat loop.
Also - the shape can not be anything except a curved rectangle, so if you do:
:A;
repeat:B]
repeat while (C)
:D;
The shape is a curved rectangle with B] in it not a square rectangle with B in it.