pub struct ColorScheme {Show 35 fields
pub added: Color,
pub removed: Color,
pub modified: Color,
pub unchanged: Color,
pub critical: Color,
pub high: Color,
pub medium: Color,
pub low: Color,
pub info: Color,
pub permissive: Color,
pub copyleft: Color,
pub weak_copyleft: Color,
pub proprietary: Color,
pub unknown_license: Color,
pub primary: Color,
pub secondary: Color,
pub accent: Color,
pub muted: Color,
pub border: Color,
pub border_focused: Color,
pub background: Color,
pub background_alt: Color,
pub text: Color,
pub text_muted: Color,
pub selection: Color,
pub highlight: Color,
pub success: Color,
pub warning: Color,
pub error: Color,
pub badge_fg_dark: Color,
pub badge_fg_light: Color,
pub selection_bg: Color,
pub search_highlight_bg: Color,
pub error_bg: Color,
pub success_bg: Color,
}Expand description
Color scheme for the TUI application. Provides semantic colors for different UI elements.
Fields§
§added: Color§removed: Color§modified: Color§unchanged: Color§critical: Color§high: Color§medium: Color§low: Color§info: Color§permissive: Color§copyleft: Color§weak_copyleft: Color§proprietary: Color§unknown_license: Color§primary: Color§secondary: Color§accent: Color§muted: Color§border: Color§border_focused: Color§background: Color§background_alt: Color§text: Color§text_muted: Color§selection: Color§highlight: Color§success: Color§warning: Color§error: Color§badge_fg_dark: Color§badge_fg_light: Color§selection_bg: Color§search_highlight_bg: Color§error_bg: Color§success_bg: ColorImplementations§
Source§impl ColorScheme
impl ColorScheme
Sourcepub const fn high_contrast() -> Self
pub const fn high_contrast() -> Self
High contrast theme (accessibility)
Sourcepub fn severity_color(&self, severity: &str) -> Color
pub fn severity_color(&self, severity: &str) -> Color
Get color for severity level
Sourcepub fn severity_bg_tint(&self, severity: &str) -> Color
pub fn severity_bg_tint(&self, severity: &str) -> Color
Get a subtle background tint for severity (used for row highlighting)
Sourcepub fn change_color(&self, status: &str) -> Color
pub fn change_color(&self, status: &str) -> Color
Get color for change status
Sourcepub fn license_color(&self, category: &str) -> Color
pub fn license_color(&self, category: &str) -> Color
Get color for license category
Sourcepub fn severity_badge_fg(&self, severity: &str) -> Color
pub fn severity_badge_fg(&self, severity: &str) -> Color
Get appropriate foreground color for severity badges Returns light fg for dark backgrounds (critical, high, info) and dark fg for bright backgrounds
Sourcepub const fn kev(&self) -> Color
pub const fn kev(&self) -> Color
Get KEV (Known Exploited Vulnerabilities) badge color Returns a bright red/orange color to indicate active exploitation
Sourcepub const fn kev_badge_fg(&self) -> Color
pub const fn kev_badge_fg(&self) -> Color
Get KEV badge foreground color
Sourcepub const fn direct_dep(&self) -> Color
pub const fn direct_dep(&self) -> Color
Get direct dependency badge background color (green - easy to fix)
Sourcepub const fn transitive_dep(&self) -> Color
pub const fn transitive_dep(&self) -> Color
Get transitive dependency badge background color (gray - harder to fix)
Sourcepub const fn change_badge_fg(&self) -> Color
pub const fn change_badge_fg(&self) -> Color
Get appropriate foreground color for change status badges All change colors (green, red, yellow) work best with dark foreground
Sourcepub fn license_badge_fg(&self, category: &str) -> Color
pub fn license_badge_fg(&self, category: &str) -> Color
Get appropriate foreground color for license category badges
Sourcepub const fn chart_palette(&self) -> [Color; 5]
pub const fn chart_palette(&self) -> [Color; 5]
Chart color palette for visualizations
Trait Implementations§
Source§impl Clone for ColorScheme
impl Clone for ColorScheme
Source§fn clone(&self) -> ColorScheme
fn clone(&self) -> ColorScheme
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ColorScheme
impl Debug for ColorScheme
Source§impl Default for ColorScheme
impl Default for ColorScheme
impl Copy for ColorScheme
Auto Trait Implementations§
impl Freeze for ColorScheme
impl RefUnwindSafe for ColorScheme
impl Send for ColorScheme
impl Sync for ColorScheme
impl Unpin for ColorScheme
impl UnsafeUnpin for ColorScheme
impl UnwindSafe for ColorScheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more