The most universally drawn doodle in human history. Now in your terminal.
cool-s draws the legendary Cool S
stroke by stroke - in glorious ANSI color - right in your
terminal. Like sl but cooler, sicker, gnarlier, doper,
and certainly more rad.
/\
// \\
// \\
// \\
// || \\
|| || ||
|| || ||
|| || ||
\\ \\ ||
\\ \\ /
\\ //
/ \\ //
|| \\ //
|| || ||
|| || ||
|| || ||
\\ || //
\\ //
\\ //
\\ //
\/
Just like the blue-box macaroni that’s probably still clogging our arteries. . .while you wait for DOOM to load.
From source (Linux / macOS / WSL):
git clone https://github.com/fourzerosix/cool-s.git
cd cool-s
make
sudo make installVia pip (Python wrapper):
pip install cool-s
cool-sVia Docker:
docker run --rm -it fourzerosix/cool-scool-s [OPTIONS]
-f Fast mode - instant render/no animation
-d USECS Per-pixel delay in microseconds (default: 40000)
-s SCALE Scale factor 1-8 (default: 3, auto-fits your terminal)
-r Rainbow finale (i just want to dance)
-o, --oppenheimer Detonate the S at the end
--no-sparks Disable spark particles (we should have also probably disabled the drink in the early 2000's)
--plain No color output (you'll enjoy plain or choose your own switch from the willow tree - this hurts me more than it hurts you)
-h, --help Show help and exit (go ahead and scream - nobody is listening)
cool-s # buy the ticket, take the ride
cool-s -f -s 5 # Instant/Large (MURRRICA MODE)
cool-s -o # "Now I am become death, the destroyer of S's."
cool-s -d 60000 -r # Slow-draw with rainbow finale (like Clint Eastwood doing drag)
cool-s -s 2 --plain # Small - monochrome - great for pipes (HEY! it's not *that* small . . .)If you grew up in the 80s or 90s, you know the S. You didn’t learn it in class. You didn’t read it in a book. Some kid - maybe on the bus, maybe at lunch, maybe during a math test you were definitely failing - leaned over and showed you six lines, then connected them. Then added a pointy top and a pointy bottom. Suddenly, you had the coolest thing your pen had ever made.
You covered your Trapper Keeper in them. Your desk. The margins of your Lisa Frank notebook. The back of your hand. Time itself had no meaning while the S was being drawn.
But where did it come from? Nobody knew. Nobody knows. That’s kind of the thing.
The Cool S - also known as the Universal S, the Super S, the Pointy S, and the Graffiti S - is a graffiti sign in popular culture and childlore, typically doodled on children’s notebooks or graffitied on walls. It consists of exactly 14 line segments forming a stylized, pointed S-shape. It has also been compared to the infinity symbol - the S appears to have depth, where the overlap in the center and the appearance of a potential altitude change at the top and bottom make it look like it connects back to itself, whilst making the world wround you connect in a sort of ethereal way (as you listen the the self-titled Sublime album - love is, it’s what we’ve got - remember that).
Mathematically speaking, the Cool S has no reflection symmetry but has 2-fold rotational symmetry. Spin it 180 degrees and it looks identical (which is deeply satisfying and also completely useless information that you will now think about every time you draw one - see you in your dreams)
This is the part that made it viral before “viral” was a word:
That’s it. That’s the whole secret. Once you knew it, you couldn’t stop. A professor of language and media at Middlesex University put it well when interviewed by VICE:
“It’s probably a Moebius strip - it can’t be drawn continuously, but it does have a perpetual flow. Most nine-year-olds can’t draw, so when someone hands them a magical recipe to create something fairly cool on demand, that’ll go viral.”
The exact origin of the Cool S is unknown, but it became prevalent around the early 1980s as a part of graffiti culture. Some people report seeing it as early as the 1960s. Similar designs for the S have also been identified as early as 1890. One art history professor suggested it may have originated as a “decorated initial” in medieval scripts. So qiute possibly the Cool S may have been invented by medieval monks (NOW, that’s what I call RAD).
Jon Naar’s photographs of graffiti in New York City, taken in 1973 and published in The Faith of Graffiti in 1974, frequently contain the symbol. Jean-Michel Basquiat - one of the most influential artists of the 20th century - occasionally featured it in his artworks, including Charles the First, and in Untitled (Olive Oyl) it is labelled “CLASSIC S OF GRAFF.”
The most compelling explanation isn’t really an explanation at all - it’s a classification. The Cool S is generally considered to be an artifact of childlore, meaning that it is taught by children to children over the course of generations. It spreads the same way jump-rope rhymes spread (just how your mom’s legs spread 9 months before your ugly ass popped out). The same way that thing where you hold someone’s wrists and spin them spread. Kid sees it, kid learns it, kid teaches it, repeat.
A 2022 Atlantic article on childlore noted that kids have been passing down games, rhymes, and legends this way since forever - and that the Cool S is one of the purest modern examples of the form. No adult invented it (no such thing as adults). No corporation owns it (well…). No one put it in a textbook. It just exists, flowing from kid to kid like a slightly more geometric version of cooties or bags of the devil’s lettuce.
This is where cool-s enters the picture. The S has been
drawn on notebooks, walls, desks, arms, textbook covers, bathroom
stalls, and the margins of history exams. It has been photographed by
documentary photographers in 1973, painted by Basquiat, worn on
streetwear, and apparently trademarked by a former coffee van
entrepreneur.
It had never been drawn, stroke by stroke, in 7-stage animated ANSI color with optional spark particles and an atomic bomb finale, in a Linux terminal.
Until now.
The Cool S is 14 line segments across 7 stages:
| Stage | What is drawn | Color |
|---|---|---|
| 1 | Three top vertical bars | White |
| 2 | Three bottom vertical bars | White |
| 3 | Two diagonal connectors | Cyan |
| 4 | Top inverted-V cap | Yellow |
| 5 | Bottom V base | Green |
| 6 | Left closing diagonal | Magenta |
| 7 | Right closing diagonal | Red |
All segments are defined in a square-pixel coordinate grid (x: 0-4,
y: 0-10). At render time, each unit is multiplied by scale,
and the x-coordinate is doubled (col = sq_x * scale * 2) to
compensate for terminal character aspect ratio - giving true 45-degree
diagonals that actually look like 45 degrees.
Each segment is drawn pixel by pixel using Bresenham’s line
algorithm. Between segments, spark particles emit from the endpoint and
drift upward. After all 14 strokes, the shape flashes to solid white.
With -r, it then cycles through all 7 stage colors in a
rolling rainbow wave before settling.
-o)After the S finishes drawing, there is a brief pause. Then:
“Now I am become death, the destroyer of S’s.” – J. Robert Oppenheimer (paraphrased; he was talking about a different kind of S)
git clone https://github.com/fourzerosix/cool-s.git
cd cool-s
make
sudo make install # installs to /usr/local/bin
sudo make uninstall # removes itCustom prefix:
sudo make install PREFIX=/usrOne-liner (no make):
gcc -O2 -o cool-s src/cool-s.c -lm && sudo cp cool-s /usr/local/bin/pip install cool-s
cool-s # runs the binaryThe pip package bundles the compiled binary for Linux x86-64 and macOS. On other platforms it compiles from source at install time (requires gcc).
# Interactive (recommended -- needs a TTY for ANSI animation)
docker run --rm -it fourzerosix/cool-s
# With flags
docker run --rm -it fourzerosix/cool-s cool-s -o
# Fast mode (works without TTY)
docker run --rm fourzerosix/cool-s cool-s -f --plain| Platform | Status |
|---|---|
| Linux (x86-64) | Full support |
| macOS (Intel/Apple) | Full support |
| WSL / Windows Terminal | Full support |
| FreeBSD / other POSIX | Should work |
| Windows (native cmd) | No |
Requires a VT100-compatible terminal with ANSI color support. Most modern terminals qualify. If your terminal was made after 1990, you’re fine.
make check # smoke tests
make dist # create release tarballSee CONTRIBUTING.md for guidelines.
sl – the original terminal toy this was inspired
byR.I.P. Daniel John Epeneter - Love you cuzzo!