Carbon


RGBColor

Header: Quickdraw.h

struct RGBColor {
    UInt16 red; 
    UInt16 green; 
    UInt16 blue;
};
typedef RGBColor RGBColorPtr;

Field descriptions

red

An unsigned integer specifying the red value of the color.

green

An unsigned integer specifying the green value of the color.

blue

An unsigned integer specifying the blue value of the color.

You usually specify a color to QuickDraw by creating an RGBColor structure in which you assign the red, green, and blue values of the foreground color. For example, when you want to set the foreground color for drawing, you create an RGBColor structure that defines the foreground color you desire; then you pass that structure as a parameter to the RGBForeColor function.

In an RGBColor structure, three 16-bit unsigned integers give the intensity values for the three additive primary colors.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)