This sample shows how to use colors on a PDF page canvas.
Docotic.Pdf library supports Gray, RGB and CMYK device-dependent colors. Corresponding classes are PdfGrayColor, PdfRgbColor and PdfCmykColor.
You can change the color of a canvas pen to specify the color for strokes. Use the PdfPen.Color property for this.
There is also a brush that is used to fill areas and shapes. You can change the brush color using the PdfBrush.Color property.