Defines the characteristics of color objects and describes the look and behavior of the collection objects through its properties and methods
Syntax:
Class Color
Remarks:
The Color class defines the characteristics of color objects and describes the look and behavior of the collection objects through its properties and methods. A color is an effect applied to an object that alters the object's appearance by the way it reflects light. A color model is a system that defines the number and type of colors that make up an image, and that is used to organize and define colors according to a set of basic properties that can be reproduced. Black-and-white, grayscale, RGB, CMYK, and paletted are examples of popular color modes. There are many different color models that define colors: HSB, RGB, CMYK, and CIE LAB. The RGB and CMYK color models are only two of a number of models developed to suit a variety of digital design and desktop-publishing applications. It is not necessary to be familiar with all of these models, but it is helpful to be familiar with a few of the more widely used ones. We all perceive color differently. Color is subjective to the human eye. Each device that interacts with your project's file - the scanner, monitor, and printer - may have a different color space. For example, a color that is visible to the human eye may not be reproducible by your printer. Because there are so many color variations, a precise method for defining each color is required. For example, when you find the perfect shade of light orange, you need to be able to reproduce that color and possibly tell others how to do the same. A color model defines that perfect shade of light orange by breaking it down into precise components that allow you to accurately transmit the information to other people and to the electronic devices you use to create projects.
Properties:
Name Description
Application Gets the application to which the object belongs
BW Gets or sets Black and White state
CMYCyan Gets or sets the CMY Cyan color value
CMYKBlack Gets or sets the CMYK Black color value
CMYKCyan Gets or sets the CMYK Cyan color value
CMYKMagenta Gets or sets the CMYK Magenta color value
CMYKYellow Gets or sets the CMYK Yellow color value
CMYMagenta Gets or sets the CMY Magenta color value
CMYYellow Gets or sets the CMY Yellow color value
ColorContext Returns a read-only color context associated with this color object
ColorStyleName Returns the name of the color style or an empty if the color is not a color style
Gray Gets or sets the Gray value
HexValue Gets or sets the web-compatible RGB value of the color as a hexadecimal string
HLSHue Gets or sets the HLS Hue value
HLSLightness Gets or sets the HLS Lightness value
HLSSaturation Gets or sets the HLS Saturation value
HSBBrightness Gets or sets the HSB Brightness value
HSBHue Gets or sets the HSB Hue value
HSBSaturation Gets or sets the HSB Saturation value
InGamutColor Returns the corrected color to be within the current printer gamut
IsCMYK Returns True if the color is CMYK
IsColorStyle Returns true if the color is a color style
IsGray Returns True if the color has only black component
IsInGamut Returns True if the color is within the current printer gamut
IsSpot Returns True if the color is a spot color
IsTintable Returns True if the color can have tints
IsValidDuotoneColor Returns True if the color can be used in duotones
IsWhite Returns True if the color is white
LabComponentA Gets or sets the LAB A color value
LabComponentB Gets or sets the LAB B color value
LabLuminance Gets or sets the LAB L color value
Name Gets color name
Palette Returns a palette this color is obtained from, if one exists
PaletteIdentifier Returns a unique identifier of the palette this color is obtained from
Parent Gets the parent of which this object is a child
RGBBlue Gets or sets the RGB Blue color value
RGBGreen Gets or sets the RGB Green color value
RGBRed Gets or sets the RGB Red color value
RGBValue Specifies the RGB color value as a single integer
SpotColorID Gets or sets the color ID that identifies a spot color within its corresponding palette
SpotColorName Returns the name of the spot color this color is derived from
Tint Gets or sets the Fixed Palette Color's Tint
Type Gets color type
ValidDuotoneColor Returns the corrected color to be used in duotones
YIQChromaI Gets or sets the YIQ I color value
YIQChromaQ Gets or sets the YIQ Q color value
YIQLuminanceY Gets or sets the YIQ Y color value
Methods:
Name Description
BlendWith Mixes the color with the given color using the specified ratio
BWAssign Assigns a Black and White color model; Only accepts a boolean
CMYAssign Assigns the CMY color model
CMYKAssign Assigns the CMYK color model
ConvertTo Converts the color to a given color type. Optionally the source and or destination color context could be specified. Returns True if the color conversion has been performed
ConvertToBW Converts the color model to Black and White
ConvertToCMY Converts the color model to CMY
ConvertToCMYK Converts the color model to CMYK
ConvertToGray Converts the color model to Grayscale
ConvertToHLS Converts the color model to HLS
ConvertToHSB Converts the color model to HSB
ConvertToLab Converts the color model to LAB
ConvertToPalette Finds the matching color from the specified palette
ConvertToRGB Converts the color model to RGB
ConvertToYIQ Converts the color model to YIQ
CopyAppearance Copies one color into another and converts the color values into the destination color's color context. The optional source color context could be used to override source color's color context
CopyAssign Copies color model assignment
CorelScriptAssign Assigns a color object based on Corel SCRIPT color specification values
CorelScriptGetComponent Gets Corel SCRIPT values from a color object for use in Corel SCRIPT
GetColorDistanceFrom Returns a relative measurement of distance between two colors in a color space
GetCopy Creates a new color objects using a copy of the color information
GrayAssign Assigns the Grayscale color model
HLSAssign Assigns the HLS color model
HSBAssign Assigns the HSB color model
Invalidate Clears the color to an invalid state
IsSame Returns True if the two colors are of the same color model, with equal color values
LabAssign Assigns the LAB color model
ModifyColorStyleColor Modifies the color or the color style, all objects referencing the color style will be updated
PaletteAssign Assigns a color from a specific palette
RegistrationAssign Assigns the Registration color model
RGBAssign Assigns the RGB color model
SetName Assigns a name to an unnamed color
SpotAssign Assigns a spot color from a given palette
SpotAssignByName Assigns a spot color from a given palette by name
StringAssign Decodes a string into color information
ToString Returns color information encoded into a string
UserAssign Brings up the Color dialog to allow the user to assign a color
UserAssignEx Brings up the Color dialog to allow the user to assign a color
YIQAssign Assigns the YIQ color model