File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
crates/terminal-colorsaurus/src Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 9
9
//! * Background and foreground color detection.
10
10
//! * Uses a fast and reliable heuristic to detect if the terminal supports color querying.
11
11
//! * *Correct* perceived lightness calculation.
12
- //! * Works on Windows (*soon* ).
12
+ //! * Works on Windows (starting with Windows Terminal v1.22 ).
13
13
//! * Safely restores the terminal from raw mode even if the library errors or panicks.
14
14
//! * Does not send any escape sequences if `TERM=dumb`.
15
15
//! * Works even if all of stderr, stdout and stdin are redirected.
Original file line number Diff line number Diff line change 3
3
[ ![ Docs] ( https://img.shields.io/docsrs/terminal-colorsaurus/latest )] ( https://docs.rs/terminal-colorsaurus )
4
4
[ ![ Crate Version] ( https://img.shields.io/crates/v/terminal-colorsaurus )] ( https://crates.io/crates/terminal-colorsaurus )
5
5
6
-
7
6
Determines the background and foreground color of the terminal
8
7
using the ` OSC 10 ` and ` OSC 11 ` escape codes.
9
8
10
9
This library helps answer the question * «Is this terminal dark or light?»* .
11
10
12
- Windows is unfortunately [ not supported ] ( ./doc/windows.md ) .
11
+ Works in all major terminals including Windows Terminal (starting with v1.22 ).
13
12
14
13
## Example
15
14
``` rust,no_run
You can’t perform that action at this time.
0 commit comments