The RGB values of a named color can be looked up in the color database by sending the lookupColor: message to a CgScreen. The method is passed the color name to look up. The result is the corresponding CgRGBColor, if the color name was found in the database, or nil if the name was not found.This code prints a string such as aCgRGBColor(16rFFFF, 16rA5A5, 16r0000) on the Transcript Window. The actual values can differ, depending on the platform.
|