I currently update button's color using
if button.color == "blue":
color = QColor(BLUE)
elif button.color == "red":
color = QColor(RED)
else:
color = QColor("transparent")
palette = button.palette()
palette.setColor(QPalette.ColorRole.Button, color)
button.setPalette(palette)
button.setAutoFillBackground(True)
but this makes them fully colored. I only want the rounded part to be colored. How do I do this?