Home

Awesome

py-window-styles

Customize your UI window with awesome built-in Windows 11 header styles and themes. Windows 10 is also supported (only themes).

Screenshot

Supported UI Libraries

<img src="https://img.shields.io/badge/View-Examples-informational?&color=darkblue&style=for-the-badge" width="150">

Installation

pip install pywinstyles

<img src="https://img.shields.io/badge/Platform-Windows-informational?" width="150"> <img src="https://img.shields.io/pypi/v/pywinstyles?style=flat" width="90"> <img src="https://static.pepy.tech/badge/pywinstyles" width="130">

Apply Window Styles/Themes

import pywinstyles
...
pywinstyles.apply_style(window, style)
...
Style NamePreview (may vary with diffrent windows versions)
mica
acrylic
aero (GPU Heavy)
transparent (GPU Heavy)
optimised
win7
inverse
native
popup
dark
normalNo Change

Apply Custom Window Colors (Only works in windows 11)

Change Title Bar Color

pywinstyles.change_header_color(window, color="#00524d")  

Change Title Text Color

pywinstyles.change_title_color(window, color="white") 

Change Border Color

pywinstyles.change_border_color(window, color="#00ffff")

Get Windows Accent Color

default_color = pywinstyles.get_accent_color() # returns hex color string

Set opacity of individual widgets

pywinstyles.set_opacity(widget_id, value=0.5)

Make a color transparent inside widget

pywinstyles.set_opacity(widget_id, color="white")

Add file DND feature to widgets

def drop_func(file):
  print(file)
pywinstyles.apply_dnd(widget_id, drop_func)

Hope this package can help in UI development with python

Author: Akash Bora

Also check hPyT package if you want to play with the title bar buttons.