I once built this solution to use colours from the Color Manager in Python. Maybe not the most elegant way …