QColor color; color.setHsl(120,255,127); // sets color to pure green
QColor color; int hue = 200; int saturation = 100; int lightness = 50; color.setHsl(hue,saturation,lightness); // sets color based on input valuesThis example sets the color based on user input values for hue, saturation, and lightness. Package library: Qt Framework (QtCore and QtGui)