user
Task
:   Print out the word 'RAINBOW' to the screen with every character being a different color of the rainbow.
assistant
```
use Color::Names:api<2>;
use Color::Names::X11 :colors;

for 'RAINBOW',
    'Another phrase that happens to contain the word "Rainbow".'
  -> $rainbow-text {
    for $rainbow-text.comb Z, flat(<red orange yellow green blue indigo violet> xx *) -> ($l, $c) {
        print "\e[38;2;{COLORS{"{$c}-X11"}<rgb>.join(';')}m$l\e[0"
    }
    say '';
}

```

Output:

Displayed here as HTML as ANSI colors don't show up on web interfaces.

RAINBOW  
Another phrase that happens to contain the word "Rainbow".