
Zero-allocation, zero-cost terminal colorization with compile-time and runtime RGB/Xterm/ANSI colors, styling, format-trait support, optional terminal detection, NO_COLOR/FORCE_COLOR overrides, dependency-less, const-friendly API and hand-picked color names.
This is a Kotlin Multiplatform line-by-line transliteration port of owo-colors/owo-colors.
Original Project: This port is based on owo-colors/owo-colors. 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/owo-colors/owo-colors. 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.
A zero-allocation no_std-compatible zero-cost way to add color to your Rust terminal to make people go owo.
Supports:
NO_COLOR/FORCE_COLOR environment variablesset_override
const
owo-colors is also more-or-less a drop-in replacement for colored, allowing colored to work in a no_std environment. No allocations or dependencies required because embedded systems deserve to be pretty too uwu.
To add to your Cargo.toml:
owo-colors = "4"use owo_colors::OwoColorize;
fn main() {
// Foreground colors
println!("My number is {:#x}!", 10.green());
// Background colors
println!("My number is not {}!", 4.on_red());
}use owo_colors::OwoColorize;
use owo_colors::colors::*;
fn main() {
// Generically color
println!("My number might be {}!", 4.fg::<Black>().bg::<Yellow>());
}use owo_colors::OwoColorize;
println!("{}", "strikethrough".strikethrough());use owo_colors::{OwoColorize, Stream::Stdout};
println!(
"{}",
"colored blue if a supported terminal"
.if_supports_color(Stdout, |text| text.bright_blue())
);Supports NO_COLOR/FORCE_COLOR environment variables, checks if it's a tty,
checks if it's running in CI (and thus likely supports color), and checks which
terminal is being used. (Note: requires supports-colors feature)
The MSRV of owo-colors is Rust 1.81.
This library has a conservative MSRV policy — Rust versions from the last 12 months will be supported (features available in newer versions will be gated by build.rs), the MSRV will only be bumped if required, and if the MSRV is bumped it will always occur with a new minor version.
dependencies {
implementation("io.github.kotlinmania:owo-colors-kotlin:0.1.2")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same MIT license as the upstream owo-colors/owo-colors. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the owo-colors authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the owo-colors/owo-colors 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 owo-colors/owo-colors.
Original Project: This port is based on owo-colors/owo-colors. 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/owo-colors/owo-colors. 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.
A zero-allocation no_std-compatible zero-cost way to add color to your Rust terminal to make people go owo.
Supports:
NO_COLOR/FORCE_COLOR environment variablesset_override
const
owo-colors is also more-or-less a drop-in replacement for colored, allowing colored to work in a no_std environment. No allocations or dependencies required because embedded systems deserve to be pretty too uwu.
To add to your Cargo.toml:
owo-colors = "4"use owo_colors::OwoColorize;
fn main() {
// Foreground colors
println!("My number is {:#x}!", 10.green());
// Background colors
println!("My number is not {}!", 4.on_red());
}use owo_colors::OwoColorize;
use owo_colors::colors::*;
fn main() {
// Generically color
println!("My number might be {}!", 4.fg::<Black>().bg::<Yellow>());
}use owo_colors::OwoColorize;
println!("{}", "strikethrough".strikethrough());use owo_colors::{OwoColorize, Stream::Stdout};
println!(
"{}",
"colored blue if a supported terminal"
.if_supports_color(Stdout, |text| text.bright_blue())
);Supports NO_COLOR/FORCE_COLOR environment variables, checks if it's a tty,
checks if it's running in CI (and thus likely supports color), and checks which
terminal is being used. (Note: requires supports-colors feature)
The MSRV of owo-colors is Rust 1.81.
This library has a conservative MSRV policy — Rust versions from the last 12 months will be supported (features available in newer versions will be gated by build.rs), the MSRV will only be bumped if required, and if the MSRV is bumped it will always occur with a new minor version.
dependencies {
implementation("io.github.kotlinmania:owo-colors-kotlin:0.1.2")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same MIT license as the upstream owo-colors/owo-colors. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the owo-colors authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the owo-colors/owo-colors 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.