The following table lists the available SVG colors:
color QML Value Type
The color type refers to an ARGB color value. It can be specified in a number of ways:
- By a SVG color name, such as “red”, “green” or “lightsteelblue”.
- By a hexadecimal triplet or quad in the form “#RRGGBB” and “#AARRGGBB” respectively. For example, the color red corresponds to a triplet of “#FF0000” and a slightly transparent blue to a quad of “#800000FF” .
- Using the Qt.rgba(), Qt.hsva(), Qt.hsla(), Qt.darker(), Qt.lighter() or Qt.tint() functions.
Rectangle < color: "steelblue" width: 40; height: 40 > Rectangle < color: "transparent" y: 40; width: 40; height: 40 > Rectangle < color: "#FF0000" y: 80; width: 40; height: 40 > Rectangle < color: "#800000FF" y: 120; width: 40; height: 40 > Rectangle < color: "#00000000" // ARGB fully transparent y: 160 width: 40; height: 40 >
A color type has r , g , b and a properties that refer to the red, green, blue and alpha values of the color, respectively. Additionally it has hsvHue , hsvSaturation , hsvValue and hslHue , hslSaturation , hslLightness properties, which allow access to color values in HSV and HSL color models accordingly:
Text < color: "red" // prints "1 0 0 1" Component.onCompleted: console.log(color.r, color.g, color.b, color.a) >
To test color values for equality, use the Qt.colorEqual() function. This allows colors to be accurately compared whether they are in property form or in any of the acceptable string specification forms.
When integrating with C++, note that any QColor value passed into QML from C++ is automatically converted into a color value, and vice-versa.
This value type is provided by the QtQuick import.
‘The Color Purple,’ in Muny premiere, addresses darker side of human nature
The Muny cast of “The Color Purple” includes (top row) Anastacia McCleskey, Tracee Beazer, Nasia Thomas, (bottom row) Evan Tyrone Martin, Gilbert Domally and Nicole Michelle Haskins.
- Photos courtesy of the Muny
- Courtesy of the Muny
- Courtesy of the Muny
- Courtesy of the Muny
Evan Tyrone Martin
- Courtesy of the Muny
- Courtesy of the Muny
Nicole Michelle Haskins
- Courtesy of the Muny
From left: Gilbert Domally, Nicole Michelle Haskins, Evan Tyrone Martin and Anastacia McCleskey in the 2022 Muny production of “The Color Purple”
- Photo by Julie A. Merkle
Although “The Color Purple” might appear to be just another musical adaptation of a popular movie, its roots go much deeper. The 1985 film directed by Steven Spielberg was based on a 1982 Pulitzer Prize-winning novel by Alice Walker. Both the film and the novel tell the story of Celie, a Southern Black woman who must overcome considerable adversity in her struggle to find her place in the world.
So the sources of inspiration for the musical, playing Aug. 3-9 at the Muny, are not only cinematic but also literary. Anastacia McCleskey stars in the production directed by Lili-Anne Brown.
With a book by Marsha Norman (“’night, Mother”) and a score by Brenda Russell, Allee Willis and Stephen Bray incorporating jazz, gospel, ragtime and blues, “The Color Purple” is unafraid to address the darker side of human nature — not unlike another Muny premiere this season, “Sweeney Todd: The Demon Barber of Fleet Street,” which ran July 16-22.