This sample shows how to use colors.
Docotic.Pdf library supports Gray, RGB and CMYK colors. Corresponding classes are PdfGrayColor, PdfRgbColor and PdfCmykColor.
Use PdfCanvas.Pen.Color and PdfCanvas.Brush.Color properties to set color of a pen or a brush to be used on canvas. Pens are used to stroke lines, brushes are used to fill areas and shapes.