11
5
Dealing with colors in non-markup languages often complicates things. I would like to see some variations of how color is used in different languages.
The object of this competition is to output 'Hello World' in the seven colors of the rainbow.
According to Wikipedia, these are the 7 colors.
Red #FF0000 (RGB: 255, 0, 0)
Orange #FF7F00 (RGB: 255, 127, 0)
Yellow #FFFF00 (RGB: 255, 255, 0)
Green #00FF00 (RGB: 0, 255, 0)
Blue #0000FF (RGB: 0, 0, 255)
Indigo #6600FF (RGB: 111, 0, 255)
Violet #8B00FF (RGB: 143, 0, 255)
The rules
- The program must output 'Hello World'. (Doesn't necessarily need to be text, but it must be distiguishable as 'Hello World')
- Each letter must be a different color.
- The colors can be in any order.
- You must use each of the seven colors at least once. (You may use more than the given colors)
- No use of markup languages in any case.
The winner is whoever has the lowest amount of characters AND follows the rules
Bonus -1 character if it is written in DART
I will pick the winner on Jan 11 (if I remember ;D).
Good luck
WINNER(s)
I made a mistake D:, updated winners.
1st. stranac - Python, 60 chars
2nd. Ilmari - Karonen Perl + GD, 146 chars
Shortest length with all rules adhered to.
Brownie points to JiminP for the DART answer.
Have I made an error? Please post a screenshot proving that you used all colors properly. "8 Colors from black to white" doesn't sound like it used the 7 required colors. – MrZander – 2012-01-12T00:33:42.227
@MrZander: I have updated my answer, and hope it now pleases you. Btw, are you sure the 6th color you provided is correct? It is pretty much the same as the 7th. – stranac – 2012-01-12T01:05:31.553
Took it straight off Wikipedia... I'm no color expert haha. – MrZander – 2012-01-12T04:29:23.917
2This relies on a custom palette to work. For example, the
H
is printed using the escape code for black, so it's not visible on most terminals. – hammar – 2012-01-12T04:58:37.890