
Maps tone (0–1) to glyphs (dots, blocks, Braille) and renders animated text‑mode art with shader or atlas renderers, themes, color modes, components and text/ANSI/SVG export.
Docs · Demo · Maven Central · Changelog
kASCII draws text-mode art in Compose Multiplatform. A tone, a number from 0 to 1, becomes a glyph: a dot, a hash, a block, a Braille pattern. A small engine does the mapping, 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.
AsciiCanvas, AsciiImage, Modifier.ascii for any element, and three renderers: a GPU shader, a cached glyph atlas, and real selectable text.
![]() scenes |
![]() shapes |
![]() space |
![]() physics |
![]() nature |
![]() creatures |
![]() objects |
![]() generative |
![]() effects |
The modules are published to Maven Central under io.github.jantursky.
commonMain.dependencies {
implementation("io.github.jantursky:kascii-compose:1.1.0") // AsciiCanvas, Modifier.ascii, renderers
implementation("io.github.jantursky:kascii-components:1.1.0") // interface, data and text-effect components
implementation("io.github.jantursky:kascii-gallery:1.1.0") // animated pieces
}kascii-core (fields, charsets, grid, export, the piece kit) comes in through the others. Use it alone when you want the engine without any UI.
A procedural background:
AsciiCanvas(
field = Fields.plasma(),
modifier = Modifier.fillMaxSize(),
charset = Charsets.Blocks,
cell = 8.dp,
)Any element as ASCII:
Box(Modifier.ascii(charset = Charsets.Blocks, cell = 8.dp)) {
Image(painter = painterResource(Res.drawable.photo), contentDescription = null)
}A piece from the gallery, and a button:
Donut(Modifier.size(320.dp))
AsciiButton(label = "OK", onClick = { /* ... */ })Your own piece with the kit:
val orbit = asciiPiece(name = "orbit", category = "space", cols = 64, rows = 24, still = 2f, loop = 10f) { t, grid ->
grid.disc(32f, 12f, 4f, '@')
grid.disc(32f + 18f * cos(t), 12f + 6f * sin(t), 1.5f, 'o')
}
AsciiPieceView(orbit, Modifier.fillMaxWidth().aspectRatio(64f / 24f))More in the docs and the live demo, where every piece comes with its source and controls for charset, speed, seed, renderer, reduced motion and copy as text, ANSI, SVG or PNG.
kascii-core/.../Field.kt) returns a tone for a position and a moment. Fields has plasma, noise, waves, ripples, gradients and more, and Field { x, y, t, aspect -> ... } is all you need for your own.Rasterizer.kt) samples the field at one point per cell, or eight for Braille, and maps the tones through a charset (Charset.kt). It is pure, so the same inputs give the same grid on every platform and you can test it with plain text.ColorMode.kt) colors each glyph from the theme, a gradient, a duotone or a per-cell source. A KasciiTheme carries the ink, paper and palette, and can be built from Material 3 colors.kascii-compose/.../internal) draws the Grid. The CPU path builds a glyph atlas from the bundled font once and draws cells from it. The GPU path hands the atlas to a runtime shader (AGSL on Android 13 and newer, Skia RuntimeEffect elsewhere) and falls back to the CPU path if anything fails. The text path produces selectable AnnotatedString text.kascii-components) are pure functions that build a Grid, tested as golden text, wrapped in a thin composable that adds interaction, semantics and focus. Pieces (kascii-gallery) are pure functions of time and a seed, tested the same way.kASCII stands on two projects that proved the idea on the web. asciicn is a React ASCII engine with ten charsets, color modes, a WebGL glyph shader and export. ascii.rest is a catalogue of about 240 animated ASCII pieces with a kit for building more. Both are MIT licensed. Where a gallery piece is a port of a specific ascii.rest piece, its KDoc says so and the original license is in THIRD_PARTY_NOTICES. The ascii.rest logo, company and distro groups are not ported, since they are third-party trademarks.
Stipple is the same author's dithered-UI library for Compose Multiplatform. It turns tone into ink and paper dots where kASCII turns it into glyphs, they share an architecture, and the docs show how to use them together.
A search of klibs.io, GitHub and Maven Central found no library for ASCII or text-mode effects on Compose Multiplatform. The nearest are ShaderX (its sample app has an ASCII camera built from one dither shader), Kasciffy (image and video to ASCII without Compose rendering) and HypnoticCanvas (shader plumbing).
All four targets build and the common code is tested on each. What was actually run, as of 2026-11-20:
| Platform | Builds | Tests run | Run as an app | Notes |
|---|---|---|---|---|
| JVM desktop | yes | unit, UI and screenshot tests | yes, the sample window | GPU and CPU renderers agree to one 8-bit step in tests. |
| wasmJs | yes | common tests in headless Chrome, 179 end-to-end checks of the demo in Chromium, Firefox and WebKit | yes, the demo | Uses the CPU renderer. The GPU path with image children is unverified in browsers. |
| Android | yes, the sample APK | common and host tests (Robolectric) | not run on a device or emulator | The AGSL shader path, asset font loading and reduced motion are unverified. |
| iOS | yes, arm64 and simulator, the sample app | common tests on the simulator | not run | The Skia shader path, the font and reduce-motion are unverified. |
Background pausing relies on the host frame clock stopping and is documented, not tested, on every platform. Per-piece frame times on a mid-range Android device and in a browser have not been measured yet.
AsciiCamera, AsciiVideo).AsciiTree, tap to select in AsciiCalendar and image support in AsciiAvatar../gradlew jvmTest # unit and UI tests on the JVM
./gradlew testAndroidHostTest # Android host tests
./gradlew wasmJsTest iosSimulatorArm64Test
./gradlew spotlessCheck apiCheck koverVerify
./gradlew :samples:desktop:run # the demo in a window
./gradlew :samples:web:wasmJsBrowserDistribution && bun run test:web
bun run build:docs # the docs site
bun run screenshots # re-record the README GIFsSee CONTRIBUTING.md. Agent instructions for building with kASCII are in skills/kascii/SKILL.md.
MIT, see LICENSE. The bundled font is a subset of JetBrains Mono merged with a subset of GNU Unifont, both under the SIL Open Font License 1.1. The notices are in THIRD_PARTY_NOTICES.
Docs · Demo · Maven Central · Changelog
kASCII draws text-mode art in Compose Multiplatform. A tone, a number from 0 to 1, becomes a glyph: a dot, a hash, a block, a Braille pattern. A small engine does the mapping, 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.
AsciiCanvas, AsciiImage, Modifier.ascii for any element, and three renderers: a GPU shader, a cached glyph atlas, and real selectable text.
![]() scenes |
![]() shapes |
![]() space |
![]() physics |
![]() nature |
![]() creatures |
![]() objects |
![]() generative |
![]() effects |
The modules are published to Maven Central under io.github.jantursky.
commonMain.dependencies {
implementation("io.github.jantursky:kascii-compose:1.1.0") // AsciiCanvas, Modifier.ascii, renderers
implementation("io.github.jantursky:kascii-components:1.1.0") // interface, data and text-effect components
implementation("io.github.jantursky:kascii-gallery:1.1.0") // animated pieces
}kascii-core (fields, charsets, grid, export, the piece kit) comes in through the others. Use it alone when you want the engine without any UI.
A procedural background:
AsciiCanvas(
field = Fields.plasma(),
modifier = Modifier.fillMaxSize(),
charset = Charsets.Blocks,
cell = 8.dp,
)Any element as ASCII:
Box(Modifier.ascii(charset = Charsets.Blocks, cell = 8.dp)) {
Image(painter = painterResource(Res.drawable.photo), contentDescription = null)
}A piece from the gallery, and a button:
Donut(Modifier.size(320.dp))
AsciiButton(label = "OK", onClick = { /* ... */ })Your own piece with the kit:
val orbit = asciiPiece(name = "orbit", category = "space", cols = 64, rows = 24, still = 2f, loop = 10f) { t, grid ->
grid.disc(32f, 12f, 4f, '@')
grid.disc(32f + 18f * cos(t), 12f + 6f * sin(t), 1.5f, 'o')
}
AsciiPieceView(orbit, Modifier.fillMaxWidth().aspectRatio(64f / 24f))More in the docs and the live demo, where every piece comes with its source and controls for charset, speed, seed, renderer, reduced motion and copy as text, ANSI, SVG or PNG.
kascii-core/.../Field.kt) returns a tone for a position and a moment. Fields has plasma, noise, waves, ripples, gradients and more, and Field { x, y, t, aspect -> ... } is all you need for your own.Rasterizer.kt) samples the field at one point per cell, or eight for Braille, and maps the tones through a charset (Charset.kt). It is pure, so the same inputs give the same grid on every platform and you can test it with plain text.ColorMode.kt) colors each glyph from the theme, a gradient, a duotone or a per-cell source. A KasciiTheme carries the ink, paper and palette, and can be built from Material 3 colors.kascii-compose/.../internal) draws the Grid. The CPU path builds a glyph atlas from the bundled font once and draws cells from it. The GPU path hands the atlas to a runtime shader (AGSL on Android 13 and newer, Skia RuntimeEffect elsewhere) and falls back to the CPU path if anything fails. The text path produces selectable AnnotatedString text.kascii-components) are pure functions that build a Grid, tested as golden text, wrapped in a thin composable that adds interaction, semantics and focus. Pieces (kascii-gallery) are pure functions of time and a seed, tested the same way.kASCII stands on two projects that proved the idea on the web. asciicn is a React ASCII engine with ten charsets, color modes, a WebGL glyph shader and export. ascii.rest is a catalogue of about 240 animated ASCII pieces with a kit for building more. Both are MIT licensed. Where a gallery piece is a port of a specific ascii.rest piece, its KDoc says so and the original license is in THIRD_PARTY_NOTICES. The ascii.rest logo, company and distro groups are not ported, since they are third-party trademarks.
Stipple is the same author's dithered-UI library for Compose Multiplatform. It turns tone into ink and paper dots where kASCII turns it into glyphs, they share an architecture, and the docs show how to use them together.
A search of klibs.io, GitHub and Maven Central found no library for ASCII or text-mode effects on Compose Multiplatform. The nearest are ShaderX (its sample app has an ASCII camera built from one dither shader), Kasciffy (image and video to ASCII without Compose rendering) and HypnoticCanvas (shader plumbing).
All four targets build and the common code is tested on each. What was actually run, as of 2026-11-20:
| Platform | Builds | Tests run | Run as an app | Notes |
|---|---|---|---|---|
| JVM desktop | yes | unit, UI and screenshot tests | yes, the sample window | GPU and CPU renderers agree to one 8-bit step in tests. |
| wasmJs | yes | common tests in headless Chrome, 179 end-to-end checks of the demo in Chromium, Firefox and WebKit | yes, the demo | Uses the CPU renderer. The GPU path with image children is unverified in browsers. |
| Android | yes, the sample APK | common and host tests (Robolectric) | not run on a device or emulator | The AGSL shader path, asset font loading and reduced motion are unverified. |
| iOS | yes, arm64 and simulator, the sample app | common tests on the simulator | not run | The Skia shader path, the font and reduce-motion are unverified. |
Background pausing relies on the host frame clock stopping and is documented, not tested, on every platform. Per-piece frame times on a mid-range Android device and in a browser have not been measured yet.
AsciiCamera, AsciiVideo).AsciiTree, tap to select in AsciiCalendar and image support in AsciiAvatar../gradlew jvmTest # unit and UI tests on the JVM
./gradlew testAndroidHostTest # Android host tests
./gradlew wasmJsTest iosSimulatorArm64Test
./gradlew spotlessCheck apiCheck koverVerify
./gradlew :samples:desktop:run # the demo in a window
./gradlew :samples:web:wasmJsBrowserDistribution && bun run test:web
bun run build:docs # the docs site
bun run screenshots # re-record the README GIFsSee CONTRIBUTING.md. Agent instructions for building with kASCII are in skills/kascii/SKILL.md.
MIT, see LICENSE. The bundled font is a subset of JetBrains Mono merged with a subset of GNU Unifont, both under the SIL Open Font License 1.1. The notices are in THIRD_PARTY_NOTICES.