Skip to content

Commit

Permalink
Make ColorTable public
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 19, 2024
1 parent d69b11e commit 92c5b28
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions crates/viewer/re_ui/src/color_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,21 @@ impl ColorTable {
}

#[inline]
#[allow(dead_code)]
pub fn green(&self, shade: Scale) -> egui::Color32 {
self.get(ColorToken::green(shade))
}

#[inline]
#[allow(dead_code)]
pub fn red(&self, shade: Scale) -> egui::Color32 {
self.get(ColorToken::red(shade))
}

#[inline]
#[allow(dead_code)]
pub fn blue(&self, shade: Scale) -> egui::Color32 {
self.get(ColorToken::blue(shade))
}

#[inline]
#[allow(dead_code)]
pub fn purple(&self, shade: Scale) -> egui::Color32 {
self.get(ColorToken::purple(shade))
}
Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_ui/src/design_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct DesignTokens {
/// Color table for all colors used in the UI.
///
/// Loaded at startup from `design_tokens.json`.
color_table: ColorTable,
pub color_table: ColorTable,

// TODO(ab): get rid of these, they should be function calls like the rest.
pub top_bar_color: egui::Color32,
Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub mod zoom_pan_area;
use egui::NumExt as _;

pub use self::{
color_table::{ColorToken, Hue, Scale},
color_table::{ColorTable, ColorToken, Hue, Scale},
command::{UICommand, UICommandSender},
command_palette::CommandPalette,
context_ext::ContextExt,
Expand Down

0 comments on commit 92c5b28

Please sign in to comment.