title: Python & PyQt5 : How to get RGB color values of a frame?
body: <p>I'm trying to build an PyQt5 application about getting RGB values of your selected color. I have written a code that you can select a color and I can display the color in a frame;</p>
  
  <pre><code>import sys
  from pprint import pprint
  from PyQt5.QtWidgets import QWidget,QPushButton,QFrame,QColorDialog,QApplication
  from PyQt5.QtGui import QColor
  
  class TutorialWindow(QWidget):
      def __init__(self):
          super().__init__()
          selected_color = QColor(0,0,255)
          self.button = QPushButton("Choose color",self)
          self.button.move(25,25)
          self.button.clicked.connect(self.showColorDialog)
  
          self.frame= QFrame(self)
          self.frame.setStyleSheet("QWidget { background-color: %s}" %selected_color.name())
          self.frame.setGeometry(150,22,50,50)
          self.setGeometry(300,300,250,200)
  
      def showColorDialog(self):
          selected_color = QColorDialog.getColor()
          if selected_color.isValid():
              self.frame.setStyleSheet("QWidget { background-color: %s}" %selected_color.name())
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      pprint("input parameters = " + str(sys.argv))
      tutorial_window = TutorialWindow()
      tutorial_window.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>But I want one more thing. As you see, after you run and select your color; I want to print frame's color's RGB values. How can I add this to my code? </p>
  
  <p>Thank you so much!</p>