StroepWafel

Portfolio & Creative Works

Privacy Policy

© 2025 StroepWafel (Max Kuchel)

Theme Documentation

This guide explains how to create custom themes for LYTE.

Quick Start

  1. Copy demo_theme.json.demo and rename it to your_theme_name.json
  2. Find the name key in the JSON ("name": "Demo Theme") and change it to your theme
  3. Edit the color and style values to your liking
  4. Save the file in the themes folder:
    • Exe installation: %LOCALAPPDATA%\LYTE\themes\
    • Portable installation: themes\ (relative to application directory)
  5. Restart LYTE - your theme will appear in the theme dropdown menu

Basic Structure

A theme file is a JSON file with the following structure:

{
    "name": "Your Theme Name",
    "colors": {
        "Element1Name": [R, G, B, A],
        "Element2Name": [R, G, B, A]
    },
    "styles": {
        "Element1Name": Value,
        "Element2Name": Value
    }
}

File Naming

  • Theme files must end with .json (e.g., my_theme.json)
  • The filename (without .json) becomes the theme identifier
  • Example: ocean_theme.json creates a theme named ocean_theme
  • See demo_theme.json.demo for a complete example (rename it to .json to use it)

Theme Folder Location

Theme files are stored in the themes folder:

  • Exe installation: %localappdata%\LYTE\themes\
  • Portable installation: themes\ (relative to application directory)

Note: %LOCALAPPDATA% typically expands to C:\Users\<YourUsername>\AppData\Local\ on Windows.

Color Values

All colors are in RGBA format: [Red, Green, Blue, Alpha]

  • Each value ranges from 0-255
  • Alpha controls transparency: 255 = fully opaque, 0 = fully transparent
  • Example: [255, 0, 0, 255] = solid red, [255, 0, 0, 128] = semi-transparent red

Available Colors

All color properties available in LYTE themes. Colors are applied to different UI elements in the DearPyGui interface.

Color NameDescription
WindowBgBackground color for all windows and main panels. This is the base background color of the application.
FrameBgBackground color for frames, input fields, text boxes, and container elements. Usually slightly lighter or darker than WindowBg for contrast.
ButtonDefault button background color when not hovered or active. This is the base state for all buttons.
ButtonHoveredButton background color when the mouse cursor hovers over it. Typically brighter or more saturated than the default Button color.
ButtonActiveButton background color when clicked or pressed. Usually the brightest or most saturated state to provide clear feedback.
TextDefault text color used throughout the interface for labels, text inputs, and general UI text. Ensure good contrast with background colors.
SliderGrabColor of the slider handle/thumb (the draggable part of sliders). Used for volume and progress sliders.
SliderGrabActiveColor of the slider handle when it's being actively dragged. Usually brighter than SliderGrab to indicate interaction.
HeaderBackground color for collapsible headers, list headers, and section headers. Used in expandable UI sections.
HeaderHoveredHeader background color when the mouse hovers over it. Provides visual feedback for interactive headers.
HeaderActiveHeader background color when clicked or expanded. Indicates the active/expanded state of collapsible sections.
ScrollbarBgBackground color of the scrollbar track (the area behind the scrollbar handle). Usually semi-transparent (alpha < 255) for a subtle appearance.
ScrollbarGrabColor of the scrollbar handle/thumb (the draggable part). Should contrast with ScrollbarBg for visibility.
ScrollbarGrabHoveredScrollbar handle color when the mouse hovers over it. Provides hover feedback for better interactivity.
ScrollbarGrabActiveScrollbar handle color when being actively dragged. Usually the brightest state to indicate active interaction.
CheckMarkColor of checkmarks in checkboxes. Should contrast well with the checkbox background for visibility.
TabBackground color of inactive tabs. Used in tabbed interfaces to distinguish inactive tabs from the active one.
TabHoveredTab background color when the mouse hovers over it. Provides visual feedback before clicking.
TabActiveBackground color of the currently active/selected tab. Should stand out from inactive tabs to clearly show the active state.
TitleBgBackground color of window title bars. The area at the top of windows that typically contains the window title.
TitleBgActiveBackground color of the active/focused window title bar. Used to indicate which window has focus when multiple windows are open.
TitleBgCollapsedBackground color of collapsed window title bars. Usually semi-transparent (alpha < 255) for a subtle appearance when windows are minimized or collapsed.
MenuBarBgBackground color of the menu bar at the top of windows. The area containing File, View, Help, etc. menus.
BorderColor of borders around frames, windows, and UI elements. Used to create visual separation between different sections.
SeparatorColor of separator lines between UI elements. Used for visual division in menus, lists, and grouped controls.
PopupBgBackground color of popup menus, dropdown menus, and dialog boxes. Usually slightly transparent (alpha around 240-250) for a layered appearance.
TextSelectedBgBackground color behind selected text. Used when text is highlighted/selected. Usually semi-transparent (alpha around 150-200) so text remains readable.

Style Values

Style properties control the appearance and spacing of UI elements. These values affect the visual style rather than colors.

Style NameDescription
FrameRoundingCorner rounding radius for frames, input fields, and containers. Value in pixels: 0.0 = sharp corners, higher values = more rounded. Typical range: 0-12.
FrameBorderSizeThickness of borders around frames and input fields in pixels. 0.0 = no border, higher values = thicker borders. Typical range: 0.0-2.0.
WindowRoundingCorner rounding radius for windows in pixels. 0.0 = sharp corners, higher values = more rounded. Usually equal to or greater than FrameRounding. Typical range: 0-16.
ScrollbarSizeWidth of scrollbars in pixels. Controls how wide the scrollbar track appears. Typical range: 8-20 pixels.
ScrollbarRoundingCorner rounding radius for scrollbars in pixels. Makes scrollbar handles rounded. 0.0 = sharp, higher = more rounded. Typical range: 0-8.
TabRoundingCorner rounding radius for tabs in pixels. Controls how rounded tab corners are. 0.0 = sharp, higher = more rounded. Typical range: 0-8.
GrabRoundingCorner rounding radius for grab handles (slider thumbs, resize handles) in pixels. Makes interactive handles rounded. Typical range: 0-8.
ChildRoundingCorner rounding radius for child windows and panels in pixels. Controls rounding of nested UI containers. Typical range: 0-12.
PopupRoundingCorner rounding radius for popup menus and dialogs in pixels. Makes popups and dropdowns rounded. Typical range: 0-12.
ItemSpacingSpacing between UI items as an array: [horizontal, vertical] in pixels. Controls spacing between buttons, inputs, and other elements. Example: [8, 6] = 8px horizontal, 6px vertical.
ItemInnerSpacingInner spacing within items (padding inside buttons, inputs, etc.) as an array: [horizontal, vertical] in pixels. Controls internal padding. Example: [6, 6] = 6px padding on all sides.

Tips

  • Use a color picker tool to get RGB values from images or websites
  • Test your theme with both light and dark content to ensure readability
  • Keep contrast ratios high for text readability
  • Alpha values (transparency) work best for backgrounds, not text
  • Rounding values of 0.0 create sharp, modern corners
  • Higher rounding values (8-12) create softer, more rounded corners

Example Theme File

{
  "name": "Demo Theme",
  "colors": {
    "WindowBg": [25, 25, 25, 255],
    "FrameBg": [35, 35, 35, 255],
    "Button": [60, 70, 60, 255],
    "ButtonHovered": [80, 120, 80, 255],
    "ButtonActive": [100, 150, 100, 255],
    "Text": [220, 220, 220, 255],
    "SliderGrab": [100, 150, 100, 255],
    "SliderGrabActive": [120, 180, 120, 255],
    "Header": [40, 40, 40, 255],
    "HeaderHovered": [80, 120, 80, 255],
    "HeaderActive": [100, 150, 100, 255],
    "ScrollbarBg": [35, 35, 35, 128],
    "ScrollbarGrab": [60, 70, 60, 255],
    "ScrollbarGrabHovered": [80, 120, 80, 255],
    "ScrollbarGrabActive": [100, 150, 100, 255],
    "CheckMark": [100, 150, 100, 255],
    "Tab": [60, 70, 60, 255],
    "TabHovered": [80, 120, 80, 255],
    "TabActive": [100, 150, 100, 255],
    "TitleBg": [25, 25, 25, 255],
    "TitleBgActive": [40, 50, 40, 255],
    "TitleBgCollapsed": [25, 25, 25, 128],
    "MenuBarBg": [30, 30, 30, 255],
    "Border": [70, 90, 70, 255],
    "Separator": [70, 90, 70, 255],
    "PopupBg": [35, 35, 35, 240],
    "TextSelectedBg": [80, 120, 80, 150]
  },
  "styles": {
    "FrameRounding": 8,
    "FrameBorderSize": 0.5,
    "WindowRounding": 12,
    "ScrollbarSize": 12,
    "ScrollbarRounding": 8,
    "TabRounding": 8,
    "GrabRounding": 8,
    "ChildRounding": 8,
    "PopupRounding": 8,
    "ItemSpacing": [8, 6],
    "ItemInnerSpacing": [6, 6]
  }
}