
Terminal styling toolkit: style definitions, git/LS_COLORS parsers, ANSI escape parsing, converters to ROFF/SVG, backend adapters and color utilities for colored terminal output.
This is a Kotlin Multiplatform line-by-line transliteration port of rust-cli/anstyle.
Original Project: This port is based on rust-cli/anstyle. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced and lightly edited from
https://github.com/rust-cli/anstyle.git. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs so they continue to resolve from this repository.
This repo contains:
anstream for a simple cross platform library for writing colored text to a terminalanstyle for style definitionsanstyle-git for parsing git style descriptionsanstyle-ls for parsing LS_COLORS style descriptionsanstyle-roff for converting ANSI codes to ROFF
anstyle-svg for converting ANSI codes to SVG
anstyle-ansi-term for adapting anstyle to ansi_term
anstyle-crossterm for adapting anstyle to crossterm
anstyle-owo-colors for adapting anstyle to owo-colors
anstyle-syntect for adapting anstyle to syntect
anstyle-termcolor for adapting anstyle to termcolor
anstyle-yansi for adapting anstyle to yansi
anstyle-lossy for converting between color typesanstyle-parse for parsing ANSI Style Escapesanstyle-wincon for styling legacy Microsoft terminalscolorchoice-clap for using color flag in clap
dependencies {
implementation("io.github.kotlinmania:anstyle-kotlin:0.1.5")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
Licensed under either of:
LICENSE-APACHE)LICENSE-MIT)at your option.
Original work copyrighted by the anstyle authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the rust-cli/anstyle maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.
This is a Kotlin Multiplatform line-by-line transliteration port of rust-cli/anstyle.
Original Project: This port is based on rust-cli/anstyle. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced and lightly edited from
https://github.com/rust-cli/anstyle.git. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs so they continue to resolve from this repository.
This repo contains:
anstream for a simple cross platform library for writing colored text to a terminalanstyle for style definitionsanstyle-git for parsing git style descriptionsanstyle-ls for parsing LS_COLORS style descriptionsanstyle-roff for converting ANSI codes to ROFF
anstyle-svg for converting ANSI codes to SVG
anstyle-ansi-term for adapting anstyle to ansi_term
anstyle-crossterm for adapting anstyle to crossterm
anstyle-owo-colors for adapting anstyle to owo-colors
anstyle-syntect for adapting anstyle to syntect
anstyle-termcolor for adapting anstyle to termcolor
anstyle-yansi for adapting anstyle to yansi
anstyle-lossy for converting between color typesanstyle-parse for parsing ANSI Style Escapesanstyle-wincon for styling legacy Microsoft terminalscolorchoice-clap for using color flag in clap
dependencies {
implementation("io.github.kotlinmania:anstyle-kotlin:0.1.5")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
Licensed under either of:
LICENSE-APACHE)LICENSE-MIT)at your option.
Original work copyrighted by the anstyle authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the rust-cli/anstyle maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.