Registry / utility / rgb2ansi256

rgb2ansi256

JSON →
library0.1.1rscratesunverified

Convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and `const fn`.

# Cargo.toml [dependencies] rgb2ansi256 = "0.1.1"
INSTALL
IMPORT
SIG · RGB2ANSI256
R
rgb2ansi256
utilityrustv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rgb_to_ansi256
use rgb2ansi256::rgb_to_ansi256;

Convert an RGB color to an ANSI 256 color code.

use rgb2ansi256::rgb_to_ansi256; fn main() { let ansi_code = rgb_to_ansi256(255, 0, 0); println!("ANSI code for red: {}", ansi_code); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
rgb2ansi256 — cargo add rgb2ansi256 · libregistry