We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Color Dialog

From Esolang
Jump to navigation Jump to search
Warning: This page was made with AI assistance. Use with caution!

Color Dialog is a stack-based language based off the Color Dialog software by staredit.net user SoftWarewolf. Color Dialog is originally a tool intended to allow copying color flags for StarCraft easily.

A Color Dialog program is written in base2e15text. As in StarCraft, a flag colors all of the text that follows it until the next flag; that stretch of text is called the flag's run, and the width of the run — the number of characters in it — is the flag's operand.

Language overview

  • Ten stacks of unbounded signed integers, one per player color. Exactly one is active at a time; stack 1 is active at the start of every line. Popping an empty stack yields 0.
  • A palette register (Title or Ingame) and an alignment register (left, center or right), both set by the marks and both reset to Title / left at the start of every line.
  • Output is a dialog: each print emits one character into a field of the current width, padded according to the current alignment.
  • The program is a sequence of lines numbered from 1. Execution starts at line 1 and runs left to right; falling off the end of a line continues at the next line, and falling off the last line halts.

A run is one flag character plus every following character up to the next flag or the end of the line. Its width N is the operand of that flag.

Flags

Brief \ Title colors

Char Flag Color Hex Instruction
BS Black (h1) push — push N
STX Periwinkle (h2) #A4B4F8 dup — push N copies of the top (N=0 pushes one)
ETX Green (h3) #54BC2C roll — bring the Nth item to the top, closing the gap (N<2 does nothing)
EOT Light Green (h4) #9CE464 pick — copy the Nth item to the top (N=0 copies the top)
BEL Red (h5) #F40404 drop — discard N items (N=0 discards one)
ACK White (h6) #ffffff print — pop a value and output it as a character in a field of width N, padded per the alignment register (N<2 pads nothing)
ENQ Grey (h7) #585858 read — push the codepoints of the next N input characters (N=0 reads one); 0 at EOF

Player colors

  • If N > 0: push N onto stack k, then make stack k active.
  • If N = 0: pop the active stack and push that value onto stack k, then make stack k active — giving the value to player k.
Char Flag Color Hex Stack
BS Red (p1) #F40404 1
SO Blue (p2) #0C48CC 2
SI Teal (p3) #2CB494 3
DLE Purple (p4) #88409C 4
DC1 Orange (p5) #F88C14 5
NAK Brown (p6) #703014 6
SYN White (p7) #CCE0D0 7
ETB Yellow (p8) #FCFC38 8
CAN Green (p9) #088008 9
EM Light Yellow (p10) #FCFC7C 10

Other ingame color flags

Active while the palette register is Ingame. These are the arithmetic and control instructions. Every one of them takes the run width as an immediate right operand: if N > 0 the right operand b is N, and if N = 0 it is popped from the active stack instead. The left operand a is always popped.

Char Flag Color Hex Instruction
STX Cyan (n1) #00E4FC Push a + b
ETX Yellow (n2) #DCDC3C Push a - b
EOT White (n3) #ffffff Push a * b
ACK Red (n4) #C81818 Push a / b, truncated toward zero; division by zero halts
BEL Green (n5) #74A47C Push a mod b; modulo by zero halts
ENQ Gray (n6) #847474 jump — continue at the start of line b; line 0 or out of range halts


Marks

Char Flag Mark Instruction
DC3 Center align Palette := Title, alignment := center
DC2 Right align Palette := Ingame, alignment := right
DC4 Invisible Pop a value. If it is 0, the rest of this line and the following N lines are invisible: skip them.

Examples

interpreter: https://github.com/iannmiui-png/Color_Dialog

Cat

Echoes input until EOF.

㜀㖀㺀㞀㶀皔1

Collatz function

㢀
㜀㖀㺀㢀marine㶀뼢vulture!쩢㸀㘀up㶀뼢battlecrus꽱皔up
㠀
㖀㢀a
㚀up㚀up㶀뼢battlecrus붪㺀뼢battlecrus皔nydus
㖀㺀㚀up㚀up㶀붪꽱the swarm approaches the northern outpost, again㸀㞀
㚀up㚀up㶀㯫㸀㘀SCV㠀㘀up㶀붪battlecrus皔marine
㠀up㢀ling㶀뼢vulture!㸀㞀㖀㶀쩢a㺀a㸀㖀㶀㯫up㺀뼢SCV꽱a皔ling
㶀붪up皔ling

Truth machine

㜀㢀ghosts㶀뼢nuclear.쩢㺀皔eof
㢀zerocc㶀뼢terrans!㸀㞀㢀㶀皔
㢀protoss㶀뼢zerglin㸀㞀㶀皔one

Hello, World!

㢀You must㶀뼢 construc㸀㞀
㢀t addition㶀뼢al pylons 꽱b㸀㞀
㢀efore the㶀뼢 swarm arriv㸀㞀
㢀es at the㶀뼢 northern ou㸀㞀
㢀tpost, comm㶀뼢ander, and꽱 㸀㞀
㢀hold㶀뼢 that ridge㸀㞀
㢀 unt㶀뼢il the f㸀㞀
㢀leet has 㶀뼢landed on 쩢the㸀㞀
㢀 plateau be㶀뼢yond the r꽱u㸀㞀
㢀ined colony㶀뼢 gates at 꽱dawn㸀㞀
㢀 today, o㶀뼢r every last㸀㞀
㢀 marine th㶀뼢ere is los㸀㞀
㢀t t㶀뼢o the tides㸀㞀

Kolakoski sequence

㢀carrier㶀뼢carrier㸀㞀㢀carrier㶀뼢carrier꽱a㸀㞀㢀carrier㶀뼢carrier꽱a㸀㞀㢀a㢀up㢀SCV㶀뼢the swarm arrives!!㸀㢀a
㘀ling㖀㶀㯫up㸀㘀up㶀붪up㸀㘀nydus㶀붪up㸀㘀ling㶀꽱a㯫up㸀㘀nydus㘀up㚀up㺀a㘀up㶀쩢a㸀㘀up㖀㶀꽱you must construct additional pylons, commander!!㸀㞀㖀㚀ling㶀뼢㸀㘀nydus㶀꽱㸀㘀ling㶀뼢up㸀㘀ling㘀ling㸀㘀nydus㺀㚀up㺀a㘀up㶀쩢a㸀㘀up㖀㶀꽱you must construct additional pylons, commander!!㸀㞀㖀㚀ling㶀뼢㸀㘀nydus㶀꽱㸀㘀ling㶀뼢up㸀㘀ling㘀ling㶀皔up
㶀皔up

Field width

Prints an asterisk centered in a field of seven characters.

㸀㢀zealot㶀뼢marines㸀㞀reaver!

42 is built as 6 × 7 from zealot and marines, and the seven characters of reaver! after the white flag set the width of the printed field.

Giving a value to another player

㢀siege!冃㶀뼢vulture㸀㞀

㢀siege! pushes 6 onto stack 1. The orange flag has an empty run, so it pops that 6 and gives it to player 5, making stack 5 active; the multiplication and the print then happen there.

Computational class

Color Dialog is Turing-complete.

External resources