Skip to content
kASCII
Esc
↑↓navigate↵open⌘Jpreview
On this page

Introduction

ASCII and text-mode art for Compose Multiplatform.

kASCII draws text-mode art. A tone, a number from 0 to 1, becomes a glyph: a dot, a hash, a block, a Braille pattern. The glyph comes from a small engine, and anything in Compose can use it: a background, a photo, a button, a chart, a line of big text, or a whole animated scene.

It runs on Android, iOS, JVM desktop and wasmJs from one commonMain source set. The engine has no UI dependency, and the Compose layer has no Material dependency.

Four ideas carry everything:

  • A field says how bright each point is. It is a pure function of position and time.
  • A charset is an ordered set of glyphs, light to dark, or a bit mask such as Braille.
  • A color mode says how a glyph is colored: the theme ink, one color, a gradient, a duotone, or a color per cell.
  • A renderer draws the grid: a GPU shader, a cached glyph atlas, or real selectable text.

The library is split so you take only what you use:

Module What it holds
kascii-core Fields, charsets, grid, themes, export and the piece kit. No UI dependency.
kascii-compose AsciiCanvas, Modifier.ascii, AsciiImage, the renderers, theme and font.
kascii-components Text-mode interface and data components, and text effects.
kascii-gallery Animated pieces: scenes, shapes, space, physics, nature, creatures, objects, generative, effects.

Canvas, modifier and gallery animations pause when they are offscreen or the app is in the background, and holds a still frame when the user asks for reduced motion. The current version is 1.1.0. See the changelog for what each release changed.

Where to go next

Was this page helpful?