1. you can use
-- @_ is the default parameter in list context.
2. in scalar context
3. the HTML you create contains one FONT tag per letter, but you don't need more than @colors of them. You could change the loop to get one pass per color instead of one pass per character.