3 stable releases
| 1.0.2 | Dec 28, 2025 |
|---|---|
| 1.0.1 | Jan 6, 2025 |
| 1.0.0 | Jan 3, 2025 |
#892 in Command-line interface
218,063 downloads per month
Used in 58 crates
(via terminal-colorsaurus)
16KB
268 lines
xterm-color
Parses the subset of X11 Color Strings emitted by terminals in response to OSC color queries (OSC 10, OSC 11, ...).
Example
use xterm_color::Color;
let color = Color::parse(b"rgb:11/aa/ff").unwrap();
assert_eq!(color, Color::rgb(0x1111, 0xaaaa, 0xffff));
Docs
License
Licensed under either of
- Apache License, Version 2.0 (license-apache.txt or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (license-mit.txt or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.