|Home | Tutorial | Classes | Functions | QSA Workbench | Language | Qt API | QSA Articles | Qt Script for Applications | ![]() |
[Prev: String] [Home] [Next: Palette]
The Color class is used to represent colors. Instances of Color can be passed to C++ slots that take arguments of type QColor.
red : Number; The red component of the color. This is a value between 0 and 255.
green : Number; The green component of the color. This value is between 0 and 255.
blue : Number; The blue component of the color. This value is between 0 and 255.
name : String; The name of the color, if a matching name for the color exists; otherwise an empty string.
rgb : Number; The rgb color code of the color. The color code is a bitmask of the form 0xRRGGBB, where RR is the red component, GG is the green component, and BB is the blue component expressed as hexadecimal digits.
hue : Number; The color's hue, as defined by the HSV color model.
saturation : Number; The color's saturation, as defined by the HSV color model.
value : Number; The colors's value, as defined by the HSV color model.
setRgb( colorcode ); Sets the color code of the color. The value is a bitmask on the form 0xRRGGBB, where RR=red, GG=green, and BB=blue, all as hexadecimal digits.
setRgb( red, green, blue ); Sets the red, green and blue color values of the color to red, green and blue.
light() : Color; Returns a Color that is a lighter version of this one.
dark() : Color; Returns a Color that is a darker version of this one.
[Prev: String] [Home] [Next: Palette]
Copyright © 2001-2006 Trolltech | Trademarks | QSA version 1.1.5
|