Platform SDK: Windows GDI

Pen Color

The color attribute specifies the pen's color. An application can create a cosmetic pen with a unique color by using the RGB macro to store the red, green, blue triplet that specifies the desired color in a COLORREF structure and passing this structure's address to the CreatePen, CreatePenIndirect, or ExtCreatePen function. (The stock pens are limited to black, white, and invisible.) For more information about RGB triplets and color, see Colors.