rainbow
Jump to navigation
Jump to search
rainbow or rainbow is an esolang invented by User:None1. It uses text colored with the colors of the rainbow to do stuff.
Control Characters
Control pictures are converted to corresponding ASCII control characters when loading program.
Memory
The esolang is self-modifying, the only memory is the program itself. There's also a wrapping memory pointer and a wrapping pointer called the jump point.
Color points
Colors are mapped to numbers, called color points.
red: 0 orange: 1 yellow: 2 green: 3 cyan: 4 blue: 5 purple: 6
Color points wrap (incrementing purple gives red, and vice versa).
Commands
A command depends on the color of the character instead of the character itself.
red: increment the color point of current character orange: move the memory pointer to the right yellow: add the ASCII value of current character by the next green: input the current character cyan: output the current character blue: increment the jump point if the current character has an odd ASCII value, otherwise decrement purple: if the current character is not a null character, jump to the jump point
Characters that have other colors or don't have colors are NOPs.
Examples
Hello, World!
Hello, World!.............
Works by retrieving Hello, World
from the source code,
Cat program
.GCP
Cheating Quine
QUINE␀
Doesn't output colors.