pub struct Theme {Show 22 fields
pub success: ThemeColor,
pub error: ThemeColor,
pub warning: ThemeColor,
pub info: ThemeColor,
pub null_value: ThemeColor,
pub bool_value: ThemeColor,
pub number_value: ThemeColor,
pub string_value: ThemeColor,
pub date_value: ThemeColor,
pub binary_value: ThemeColor,
pub json_value: ThemeColor,
pub uuid_value: ThemeColor,
pub sql_keyword: ThemeColor,
pub sql_string: ThemeColor,
pub sql_number: ThemeColor,
pub sql_comment: ThemeColor,
pub sql_operator: ThemeColor,
pub sql_identifier: ThemeColor,
pub border: ThemeColor,
pub header: ThemeColor,
pub dim: ThemeColor,
pub highlight: ThemeColor,
}Expand description
SQLModel console theme with semantic colors.
Defines all colors used throughout SQLModel console output.
Use Theme::dark() or Theme::light() for predefined themes,
or customize individual colors.
§Example
use sqlmodel_console::Theme;
let theme = Theme::dark();
assert_eq!(theme.success.rgb(), (80, 250, 123));Fields§
§success: ThemeColorSuccess messages, completion indicators (green).
error: ThemeColorError messages, failure indicators (red).
warning: ThemeColorWarning messages, deprecation notices (yellow).
info: ThemeColorInformational messages, hints (cyan).
null_value: ThemeColorNULL values (typically dim/italic).
bool_value: ThemeColorBoolean values (true/false).
number_value: ThemeColorNumeric values (integers, floats).
string_value: ThemeColorString/text values.
date_value: ThemeColorDate/time/timestamp values.
binary_value: ThemeColorBinary/blob values.
json_value: ThemeColorJSON values.
uuid_value: ThemeColorUUID values.
sql_keyword: ThemeColorSQL keywords (SELECT, FROM, WHERE).
sql_string: ThemeColorSQL strings (‘value’).
sql_number: ThemeColorSQL numbers (42, 3.14).
sql_comment: ThemeColorSQL comments (– comment).
sql_operator: ThemeColorSQL operators (=, >, AND).
sql_identifier: ThemeColorSQL identifiers (table names, column names).
border: ThemeColorTable/panel borders.
header: ThemeColorHeaders and titles.
dim: ThemeColorDimmed/secondary text.
highlight: ThemeColorHighlighted/emphasized text.
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn dark() -> Self
pub fn dark() -> Self
Create the default dark theme (Dracula-inspired).
This theme is optimized for dark terminal backgrounds and uses the Dracula color palette for high contrast and visual appeal.
§Example
use sqlmodel_console::Theme;
let theme = Theme::dark();