In addition the static fromRgb(), fromHsv() and fromCmyk() functions create colors from the specified values. These functions return a copy of the color using the desired format.
To create a QColor based on either HSV or CMYK values, use the toHsv() and toCmyk() functions respectively. The QColor constructor creates the color based on RGB values. SetRgbF(float r, float g, float b, float a = 1.0) SetHsvF(float h, float s, float v, float a = 1.0) SetHslF(float h, float s, float l, float a = 1.0) SetCmykF(float c, float m, float y, float k, float a = 1.0)
SetCmyk(int c, int m, int y, int k, int a = 255) Name(QColor::NameFormat format = HexRgb) const GetRgbF(float * r, float * g, float * b, float * a = nullptr) const GetRgb(int * r, int * g, int * b, int * a = nullptr) const GetHsvF(float * h, float * s, float * v, float * a = nullptr) const
GetHsv(int * h, int * s, int * v, int * a = nullptr) const GetHslF(float * h, float * s, float * l, float * a = nullptr) const GetHsl(int * h, int * s, int * l, int * a = nullptr) const GetCmykF(float * c, float * m, float * y, float * k, float * a = nullptr) const GetCmyk(int * c, int * m, int * y, int * k, int * a = nullptr) const