anstyle-kotlin
0.1.5indexedTerminal styling toolkit: style definitions, git/LS_COLORS parsers, ANSI escape parsing, converters to ROFF/SVG, backend adapters and color utilities for colored terminal output.
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.
rust-cli/anstyleThe 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:
dependencies {
implementation("io.github.kotlinmania:anstyle-kotlin:0.1.5")
}
./gradlew build
./gradlew test
See 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.
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 ROFFanstyle-svg for converting ANSI codes to SVGanstyle-ansi-term for adapting anstyle to ansi_termanstyle-crossterm for adapting anstyle to crosstermanstyle-owo-colors for adapting anstyle to owo-colorsanstyle-syntect for adapting anstyle to syntectanstyle-termcolor for adapting anstyle to termcoloranstyle-yansi for adapting anstyle to yansianstyle-lossy for converting between color typesanstyle-parse for parsing ANSI Style Escapesanstyle-wincon for styling legacy Microsoft terminalscolorchoice-clap for using color flag in clapSurfaced from shared tags and platforms — no rankings paid for.