#!/usr/bin/python
#dv3d_gui_ColorPicker.py
#Call the system colour dialog and return a colour or 'None'
#DV3D refactor 2
#AG 26/07/2013

from PyQt4.QtGui import QColorDialog

def dv3d_gui_ColorPicker():
    newColor = QColorDialog.getColor()
    if newColor.isValid():
        #extract first 3 vals and cast to float (range 0-1)
        return newColor.getRgbF()[:3]
    else:
        return 'None'

def dv3d_gui_ColorPicker_QColor():
    newColor = QColorDialog.getColor()
    if newColor.isValid():
        #extract first 3 vals and cast to float (range 0-1)
        return newColor
    else:
        return 'None'

