Method FromHex

Namespace
SoftZenPdf
Assembly
SoftZenPdf.dll

FromHex(string)

Parses a CSS-style hex colour.

public static PdfColor FromHex(string hex)

Parameters

hex string

Six hex digits, with or without a leading #, such as #3B82F6.

Returns

PdfColor

Exceptions

FormatException

The text is not six hex digits.