Skip to main content

rusty_bubbletea/
profile.rs

1//! Cleanroom Rust port of upstream Go source file: `profile.go`
2//! Upstream Target Tag / Version: `v2.0.8`
3//!
4//! <public-docs>
5//! # Terminal Color Profile
6//!
7//! `ColorProfileMsg` representing detected terminal color profile capabilities in Bubble Tea v2.0.8.
8//! </public-docs>
9
10/// ColorProfile enum representing terminal color support level.
11#[derive(Debug, Clone, Copy, PartialEq, Eq)]
12pub enum ColorProfile {
13    /// TrueColor (24-bit RGB direct color).
14    TrueColor,
15    /// ANSI256 (256 indexed colors).
16    ANSI256,
17    /// ANSI (16 basic colors).
18    ANSI,
19    /// Ascii (monochrome/no color).
20    Ascii,
21}
22
23/// ColorProfileMsg describes the terminal's color profile.
24#[derive(Debug, Clone, Copy, PartialEq, Eq)]
25pub struct ColorProfileMsg {
26    /// Profile enum.
27    pub profile: ColorProfile,
28}