JSON Themes
JSON themes use a structured format with colors and styles keys. The theme engine converts them to Qt stylesheets (QSS) and applies them to the application.
Quick Start
- Copy
demo_theme.json.demoand rename toyour_theme_name.json - Find the
namekey and change it to your theme name - Edit the color and style values to your liking
- Save in the themes folder:
- Exe installation:
%LOCALAPPDATA%\LYTE\themes\ - Portable installation:
themes\(relative to application directory)
- Exe installation:
- Use View → Reload themes to add new themes without restarting
Basic Structure
A JSON theme file has 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.jsoncreates a theme namedocean_theme - See
demo_theme.json.demofor a complete example (rename to.jsonto 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 JSON themes. Colors are applied to UI elements in the PySide6/Qt interface via stylesheets.
| Color Name | Description |
|---|---|
WindowBg | Background for windows and main panels |
FrameBg | Frames, input fields, text boxes |
Button | Default button background |
ButtonHovered | Button on hover |
ButtonActive | Button when clicked |
Text | Default text color |
SliderGrab | Slider handle/thumb |
SliderGrabActive | Slider handle when dragging |
Header | Section and list headers |
HeaderHovered | Header on hover |
HeaderActive | Header when expanded |
ScrollbarBg | Scrollbar track |
ScrollbarGrab | Scrollbar handle |
ScrollbarGrabHovered | Scrollbar handle on hover |
ScrollbarGrabActive | Scrollbar handle when dragging |
CheckMark | Checkbox checkmarks |
Tab | Inactive tabs |
TabHovered | Tab on hover |
TabActive | Active tab |
TitleBg | Window title bars |
TitleBgActive | Focused window title |
TitleBgCollapsed | Collapsed title bars |
MenuBarBg | Menu bar (File, View, Moderation, Help) |
Border | Borders around elements |
Separator | Separator lines |
PopupBg | Popup menus and dialogs |
TextSelectedBg | Selected text highlight |
Style Values
Style properties control appearance and spacing. Mapped to Qt stylesheet properties (border-radius, padding, etc.).
| Style Name | Description |
|---|---|
FrameRounding | Corner radius for frames (0–12px) |
FrameBorderSize | Border thickness (0–2px) |
WindowRounding | Window corner radius (0–16px) |
ScrollbarSize | Scrollbar width (8–20px) |
ScrollbarRounding | Scrollbar corner radius |
TabRounding | Tab corner radius |
GrabRounding | Slider handle corner radius |
ChildRounding | Nested container corner radius |
PopupRounding | Popup corner radius |
ItemSpacing | Spacing between items [horizontal, vertical] |
ItemInnerSpacing | Padding inside items [horizontal, vertical] |
Tips
- Higher rounding values (8–12) create softer corners
- Rounding of 0 creates sharp, modern corners
- Alpha works best for backgrounds, not text
- Keep contrast high for text readability
- Use a color picker to get RGB values from images
- Use View → Reload themes after editing
Example Theme File
The demo_theme.json.demo uses a blue/ocean palette. Rename to .json to use:
{
"name": "Demo Theme",
"colors": {
"WindowBg": [18, 24, 34, 255],
"FrameBg": [30, 40, 56, 255],
"Button": [40, 90, 160, 255],
"ButtonHovered": [55, 120, 200, 255],
"ButtonActive": [35, 95, 170, 255],
"Text": [220, 230, 245, 255],
"SliderGrab": [70, 140, 220, 255],
"SliderGrabActive": [90, 160, 240, 255],
"Header": [35, 50, 75, 255],
"HeaderHovered": [55, 120, 200, 255],
"HeaderActive": [40, 90, 160, 255],
"ScrollbarBg": [18, 24, 34, 180],
"ScrollbarGrab": [60, 120, 190, 255],
"ScrollbarGrabHovered": [80, 150, 220, 255],
"ScrollbarGrabActive": [55, 110, 180, 255],
"CheckMark": [100, 160, 240, 255],
"Tab": [30, 40, 56, 255],
"TabHovered": [55, 120, 200, 255],
"TabActive": [40, 90, 160, 255],
"TitleBg": [22, 28, 40, 255],
"TitleBgActive": [30, 40, 56, 255],
"TitleBgCollapsed": [22, 28, 40, 180],
"MenuBarBg": [25, 32, 48, 255],
"Border": [45, 60, 95, 255],
"Separator": [45, 60, 95, 255],
"PopupBg": [20, 26, 38, 245],
"TextSelectedBg": [55, 120, 200, 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]
}
}