If you wanted to get a perfect match, you could build some functions like
this:

from PyQt4 import QtGui
groups = ['Disabled', 'Active', 'Inactive', 'Normal']
roles = ['Window',
        'Background',
        'WindowText',
        'Foreground',
        'Base',
        'AlternateBase',
        'ToolTipBase',
        'ToolTipText',
        'Text',
        'Button',
        'ButtonText',
         'BrightText']


def getPaletteInfo():
    palette = QtGui.QApplication.palette()
    #build a dict with all the colors
    result = {}
    for role in roles:
        for group in groups:
            qGrp = getattr(QtGui.QPalette, group)
            qRl = getattr(QtGui.QPalette, role)
            result['%s:%s' % (role, group)] =  palette.color(qGrp,
qRl).rgba()
    return result

def setPaletteFromDct(dct):
    palette = QtGui.QPalette()
    for role in roles:
        for group in groups:
            color = QtGui.QColor(dct['%s:%s' % (role, group)])
            qGrp = getattr(QtGui.QPalette, group)
            qRl = getattr(QtGui.QPalette, role)
            palette.setColor(qGrp, qRl, color)
    QtGui.QApplication.setPalette(palette)


You could pickle out the dct you get in maya and use the other function to
set it in the standalone app
JP

On Mon, Jan 23, 2012 at 7:04 AM, Panupat <[email protected]> wrote:

> Thanks everyone. I was hoping Maya would store the stylesheet
> somewhere I could reuse. But I guess setting the colors myself would
> do :)
>
> So far from Photoshop color picking
>
> * {
> background-color: rgb(64,64,64)
> color: rgb(200,200,200)
> }
>
> :disabled {
> color: rgb(96,96,96)
> }
>
> most text fields do have background of 48,48,48
>
> best regard,
> Panupat C.
>
>
> On Jan 23, 5:58 am, Ricardo Viana <[email protected]> wrote:
> > Yes. I used setStyleSheet('background-color: rgb(42,42,42);color:
> rgb(255,255,255)')
> >
> > Best regards
> > Ricardo Viana
> >
> > On Jan 22, 2012, at 3:36 AM, Panupat Chongstitwattana <
> [email protected]> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Is there a way to do this? I'm thinking about the nice dark color
> scheme of Maya 2011+.
> > > --
> > > view archives:http://groups.google.com/group/python_inside_maya
> > > change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>



-- 
John Patrick
404-242-2675
[email protected]
http://www.canyourigit.com

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to