def create_palette(light_color, color):
 palette = QPalette()
 palette.setColor(QPalette.Inactive, QPalette.Light, saturated(light_color, 50))
 palette.setColor(QPalette.Inactive, QPalette.Midlight, saturated(light_color, 90))
 palette.setColor(QPalette.Inactive, QPalette.Button, light_color)
 palette.setColor(QPalette.Active, QPalette.Light, saturated(color, 50))
 palette.setColor(QPalette.Active, QPalette.Midlight, saturated(color, 90))
 palette.setColor(QPalette.Active, QPalette.Button, color)
 palette.setColor(QPalette.ButtonText, QColor('#515151'))
 return palette

def create_palette ( light_color , color ) : palette = QPalette ( ) palette . setColor ( QPalette . Inactive , QPalette . Light , saturated ( light_color , 50 ) ) palette . setColor ( QPalette . Inactive , QPalette . Midlight , saturated ( light_color , 90 ) ) palette . setColor ( QPalette . Inactive , QPalette . Button , light_color ) palette . setColor ( QPalette . Active , QPalette . Light , saturated ( color , 50 ) ) palette . setColor ( QPalette . Active , QPalette . Midlight , saturated ( color , 90 ) ) palette . setColor ( QPalette . Active , QPalette . Button , color ) palette . setColor ( QPalette . ButtonText , QColor ( '#515151' ) ) return palette
return a new :class:qpalette from for the :class:nodebodyitem .