Color Class Reference
[ECMAScript/QtScript - Native Objects]

Qt Color type. More...

Inheritance diagram for Color:

Object List of all members.

Properties

Number blue
Number green
Number hue
String name
Number red
Number rgb
Number saturation
Number value

Constructors

 Color (String colorName)
 Color (Color color)
 Color (Number r, Number g, Number b)
 Color ()

Methods

Color dark ()
Color light ()
void setRgb (Number r, Number g, Number b)
void setRgb (Number colorCode)

Detailed Description

Qt Color type.

This is the DAZ Script counterpart of the QColor type used in the DAZ Studio SDK.


Constructor & Destructor Documentation

Color::Color (  ) 

Default Constructor.

Color::Color ( Number  r,
Number  g,
Number  b 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Component-wise constructor. Each value ( r, g, b ) should be in the range [0 - 255].

Parameters:
r The red value for the color
g The green value for the color
b The blue value for the color

Color::Color ( Color  color  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Copy constructor

Parameters:
color The color to copy

Color::Color ( String  colorName  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Sets the RGB value from colorName, which may be in one of these formats (each of R, G and B is a single hex digit): -#RGB -#RRGGBB -#RRRGGGBBB -#RRRRGGGGBBBB -A name from the color database. The color is invalid if name cannot be parsed.

Parameters:
colorName The named color to set the value of this color to.


Member Function Documentation

Color Color::dark (  ) 

Returns:
A darker version of this Color

Color Color::light (  ) 

Returns:
A lighter version of this Color

void Color::setRgb ( Number  r,
Number  g,
Number  b 
)

Sets the red, green and blue color values of this Color to r, g and b, respectively.

Parameters:
r The new Red value for the color
g The new Green value for the color
b The new Blue value for the color

void Color::setRgb ( Number  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.

Parameters:
colorCode The encoded value for the color


Member Data Documentation

Number Color::blue

The red component of the color. In the range 0 to 255.

Number Color::green

The red component of the color. In the range 0 to 255.

Number Color::hue

The hue of the color as defined in the HSV color model.

String Color::name

The name of the color if it matches a named color, otherwise an empty string.

Number Color::red

The red component of the color. In the range 0 to 255.

Number Color::rgb

The color code of the color.

Number Color::saturation

The saturation of the color as defined in the HSV color model.

Number Color::value

The value of the color as defined in the HSV color model.


Generated on Thu Sep 24 12:21:10 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.