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