S or /

SourceClass Visuals

from egui import Visuals
class Visuals:

Controls the visual style (colors etc) of egui.

You can change the visuals of a Ui with Ui.visuals_mut and of everything with egui.Context.set_visuals_of.

If you want to change fonts, use egui.Context.set_fonts instead.

Properties§

@property def button_frame(self, /) -> bool§
@button_frame.setter def button_frame(self, /, button_frame: bool) -> None§
@property def clip_rect_margin(self, /) -> float§
@clip_rect_margin.setter def clip_rect_margin(self, /, clip_rect_margin: float) -> None§
@property def code_bg_color(self, /) -> Color32§
@code_bg_color.setter def code_bg_color(self, /, code_bg_color: Color32) -> None§
@property def collapsing_header_frame(self, /) -> bool§
@collapsing_header_frame.setter def collapsing_header_frame(self, /, collapsing_header_frame: bool) -> None§
@property def dark_mode(self, /) -> bool§
@dark_mode.setter def dark_mode(self, /, dark_mode: bool) -> None§
Source@property def disabled_alpha(self, /) -> float§

Disabled widgets have their alpha modified by this.

@disabled_alpha.setter def disabled_alpha(self, /, disabled_alpha: float) -> None§
@property def error_fg_color(self, /) -> Color32§
@error_fg_color.setter def error_fg_color(self, /, error_fg_color: Color32) -> None§
@property def extreme_bg_color(self, /) -> Color32§
@extreme_bg_color.setter def extreme_bg_color(self, /, extreme_bg_color: Color32) -> None§
@property def faint_bg_color(self, /) -> Color32§
@faint_bg_color.setter def faint_bg_color(self, /, faint_bg_color: Color32) -> None§
@property def handle_shape(self, /) -> HandleShape§
@handle_shape.setter def handle_shape(self, /, handle_shape: HandleShape) -> None§
@property def image_loading_spinners(self, /) -> bool§
@image_loading_spinners.setter def image_loading_spinners(self, /, image_loading_spinners: bool) -> None§
@property def ime_composition(self, /) -> ImeComposition§
@ime_composition.setter def ime_composition(self, /, ime_composition: ImeComposition) -> None§
@property def indent_has_left_vline(self, /) -> bool§
@indent_has_left_vline.setter def indent_has_left_vline(self, /, indent_has_left_vline: bool) -> None§
@property def interact_cursor(self, /) -> CursorIcon |None§
@interact_cursor.setter def interact_cursor(self, /, interact_cursor: CursorIcon |None) -> None§
@property def numeric_color_space(self, /) -> NumericColorSpace§
@numeric_color_space.setter def numeric_color_space(self, /, numeric_color_space: NumericColorSpace) -> None§
@property def override_text_color(self, /) -> Color32 |None§
@override_text_color.setter def override_text_color(self, /, override_text_color: Color32 |None) -> None§
@property def panel_fill(self, /) -> Color32§
@panel_fill.setter def panel_fill(self, /, panel_fill: Color32) -> None§
@property def resize_corner_size(self, /) -> float§
@resize_corner_size.setter def resize_corner_size(self, /, resize_corner_size: float) -> None§
@property def selection(self, /) -> Selection§
@selection.setter def selection(self, /, selection: Selection) -> None§
@property def slider_trailing_fill(self, /) -> bool§
@slider_trailing_fill.setter def slider_trailing_fill(self, /, slider_trailing_fill: bool) -> None§
@property def striped(self, /) -> bool§
@striped.setter def striped(self, /, striped: bool) -> None§
@property def text_cursor(self, /) -> TextCursorStyle§
@text_cursor.setter def text_cursor(self, /, text_cursor: TextCursorStyle) -> None§
Source@property def text_edit_bg_color(self, /) -> Color32 |None§

The background color of egui.TextEdit.

@text_edit_bg_color.setter def text_edit_bg_color(self, /, text_edit_bg_color: Color32 |None) -> None§
@property def text_options(self, /) -> TextOptions§
@text_options.setter def text_options(self, /, text_options: TextOptions) -> None§
@property def warn_fg_color(self, /) -> Color32§
@warn_fg_color.setter def warn_fg_color(self, /, warn_fg_color: Color32) -> None§
@property def weak_text_alpha(self, /) -> float§
@weak_text_alpha.setter def weak_text_alpha(self, /, weak_text_alpha: float) -> None§
@property def weak_text_color_override(self, /) -> Color32 |None§
@weak_text_color_override.setter def weak_text_color_override(self, /, weak_text_color_override: Color32 |None) -> None§
@property def widgets(self, /) -> Widgets§
@widgets.setter def widgets(self, /, widgets: Widgets) -> None§
@property def window_corner_radius(self, /) -> CornerRadius§
@window_corner_radius.setter def window_corner_radius(self, /, window_corner_radius: CornerRadius) -> None§
Source@property def window_fill(self, /) -> Color32§

Window background color.

@window_fill.setter def window_fill(self, /, window_fill: Color32) -> None§
@property def window_highlight_topmost(self, /) -> bool§
@window_highlight_topmost.setter def window_highlight_topmost(self, /, window_highlight_topmost: bool) -> None§
@property def window_shadow(self, /) -> Shadow§
@window_shadow.setter def window_shadow(self, /, window_shadow: Shadow) -> None§
Source@property def window_stroke(self, /) -> Stroke§
@window_stroke.setter def window_stroke(self, /, window_stroke: Stroke) -> None§

Methods§

Source@staticmethod def dark() -> Visuals§

Default dark theme.

@staticmethod def default() -> Visuals§
def ime_composition_mut(self, /) -> Any: """ Edit a copy and write it back when the async context exits. """§

Edit a copy and write it back when the async context exits.

Source@staticmethod def light() -> Visuals§

Default light theme.

Sourcedef noninteractive(self, /) -> WidgetVisuals§
def selection_mut(self, /) -> Any: """ Edit a copy and write it back when the async context exits. """§

Edit a copy and write it back when the async context exits.

Sourcedef strong_text_color(self, /) -> Color32§
Sourcedef text_color(self, /) -> Color32§
def text_cursor_mut(self, /) -> Any: """ Edit a copy and write it back when the async context exits. """§

Edit a copy and write it back when the async context exits.

def text_options_mut(self, /) -> Any: """ Edit a copy and write it back when the async context exits. """§

Edit a copy and write it back when the async context exits.

Sourcedef ui(self, /, ui: Ui) -> None§
Sourcedef weak_text_color(self, /) -> Color32§