Intro

ColourTode is a spatial language!

It's just a draft right now. I'm currently making the backend for it in CellPond.

  • You can type ColourTode!

  • You can drag & drop ColourTode!

Number

Numbers can only be single-digit!

3
9
0

Number Operations

You can add and subtract numbers.

3+2
3-2

Range

Ranges represent multiple possible numbers!

0...9
<5
>0
?

Array

Arrays are lists of up to three numbers or ranges (red, green, blue).

321
??9
9 3 >0
1+1, 2+1, 3+2

Array Operations

You can also combine arrays together.

000 or 999

Constant

You can define constants with =. You can give them a single-character symbol and/or name!

three = 3
✨ = 3
🟨 Yellow = 963
⬛ Empty = 000
🔲 = >0 >0 >0
⚡ = 9
🟥 Red = ⚡00

Partial Array

Arrays can also be less than three items long.

>0 9
99

You can combine them together to make complete arrays.

🔥 = 99
🟦 Cyan = 0🔥
🟨 Yellow = 🔥0

Built-In

Some colours are built-in. You can use them! (or override them)

⭐ Any = ???
⬛ Black = 000
⬜ White = 999
🟩 Green = 293
🟥 Red = 911
🟦 Blue = 239
🟨 Yellow = 961
🟧 Orange = 931
🟪 Purple = 418
🟫 Brown
Pink = 933
Rose = 936
Cyan = 269
Grey = 111
Silver = 556

Diagram Constant

You can assign diagrams to constants too!

🐍 = 🟩🟥
🌹 = 🟥
     🟩

Rule

You can make a rule by using right-arrows.

🟥 -> 🟦
🟨 -> ⬛
⬛ -> 🟨

Split

You can make a cell split into smaller cells.

This rule makes red atoms split into two copies of itself. It will crash the engine!

💥 = 🟥🟥
🟥 -> 💥

Merge

You can merge multiple cells into one cell!

This rule makes red atoms merge together!

💞 = 🟥🟥
💞 -> 🟥

Variable

You can access variables for the red, green and blue channels of a cell.

🔴🟢🔵

This lets you edit the value of a cell, instead of just recolouring it. This makes every cell become more red over time...

🔥 = 🔴+1 ??
⭐ -> 🔥

Symmetry

Rules can be repeated with different transformations.

You can rotate a rule...

🟩⬛ -> 🟩🟩 🔄

Flip it horizontally...

🟩⬛ -> 🟩🟩 ↔

Flip it vertically... (note: it would have no effect on this rule)

🟩⬛ -> 🟩🟩 ↕️

Or any combination of them!

🟩⬛ -> 🟩🟩 🔄 ↔ ↕️

Stamp

Symbols can be assigned to diagrams. This makes the symbol behave differently on each side of the diagram.

These two code blocks have the same effect:

✨ = 🟪 -> 🟨
✨ -> ✨
🟪 -> 🟨

Identity

Stamps are helpful for maintaining the identity of a cell. It lets you use the variables/range of the correct cell. Let's look at an example...

This symbol increases the green value of a cell:

💚 = ? 🟢+1 ?

This symbol gets any cell with between 1 and 8 green:

🌱 = ? 1...8 ?

This symbol gets any cell with less than max green, and makes it greener:

🌿 = 🌱 -> 💚

Now let's use this in a rule...

⬛ -> 🌿
🌿 -> 🟩

The above rule finds any cell with a bit of green in... and makes it grow upwards. Each time it grows, it gains a bit of green! And it stops growing when it hits max green.

Steps

Rules can have more than one step. If the first step doesn't match, it tries the next step. Each step needs to have the same 'silhouette'.

This rule makes red move upwards. If it can't, it disappears instead.

⬛ -> 🟥
🟥 -> ⬛

⭐ -> ⭐
🟥 -> ⬛

Last updated