Convert RGB value to Hex
Jump to navigation
Jump to search
#!/usr/bin/env python # File:rgb2hex.py # simple utility to convert rgb values to hex # within Scribus import scribus colorN = 255 while colorN != 0: color = scribus.valueDialog('Color Values','Enter the RGB value, 0 to quit') if color == '': color = '255' colorN = int(color) hexN = hex(colorN) result = scribus.messageBox ('Hex Value','RGB value of '+ color + ' is \n Hex value of '+ hexN,scribus.BUTTON_OK)