H22: Get UI Color with Python
249 2 1-
- alexeyvanzhula1984
- Member
- 109 posts
- Joined: Nov. 2023
- Offline
-
- Italimpex Productions
- Member
- 26 posts
- Joined: Aug. 2021
- Offline
Hello. Default houdini theme uses this highlight color
Hex: #fdba00
RGB (0-255): (253, 186, 0)
RGB (0-1):
This code will pull highlight color of whatever theme you are using. For v20 or older, in first line change PySide6 to PySide2.
Another thing, if you will use that color on a mesh it won't match how it looks in the UI because of ACES colorspace. Then you will need to disable OCIO by going to Color Correction > sRGB - Display > uncheck toggle "Enable OpenColorIO" to see true color. I attached a screenshot for reference.
Hex: #fdba00
RGB (0-255): (253, 186, 0)
RGB (0-1):
This code will pull highlight color of whatever theme you are using. For v20 or older, in first line change PySide6 to PySide2.
from PySide6 import QtGui app = QtGui.QGuiApplication.instance() if app: color = app.palette().color(QtGui.QPalette.Highlight) print(f"Hex: {color.name()}") print(f"RGB (0-255): {color.getRgb()[:3]}") print(f"RGB (0-1): {[round(x / 255.0, 3) for x in color.getRgb()[:3]]}")
Another thing, if you will use that color on a mesh it won't match how it looks in the UI because of ACES colorspace. Then you will need to disable OCIO by going to Color Correction > sRGB - Display > uncheck toggle "Enable OpenColorIO" to see true color. I attached a screenshot for reference.
Edited by Italimpex Productions - Sept. 3, 2026 17:39:37
Italimpex Productions
CGI Studio specializing in directing and producing advertisements & films
CGI Studio specializing in directing and producing advertisements & films
-
- alexeyvanzhula1984
- Member
- 109 posts
- Joined: Nov. 2023
- Offline
-
- Quick Links

