Click or drag to resize

PdfColor Structure

Represents a color of a PDF content.
Inheritance Hierarchy
SystemObject
  SystemValueType
    SautinSoft.Pdf.ContentPdfColor

Namespace: SautinSoft.Pdf.Content
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2025.11.10
Syntax
public struct PdfColor : IEquatable<PdfColor>

The PdfColor type exposes the following members.

Constructors
 NameDescription
Public methodPdfColor(PdfColorSpace, Double) Initializes a new instance of the PdfColor structure using the specified color space and a single colorant value.
Public methodPdfColor(PdfColorSpace, Double) Initializes a new instance of the PdfColor structure using the specified color space and colorant values.
Public methodPdfColor(PdfColorSpace, Double, Double, Double) Initializes a new instance of the PdfColor structure using the specified color space and three colorant values.
Public methodPdfColor(PdfColorSpace, Double, Double, Double, Double) Initializes a new instance of the PdfColor structure using the specified color space and four colorant values.
Top
Properties
 NameDescription
Public propertyItem Gets the intensity of the colorant at the specified index.
Public propertyPattern Gets the pattern or .
Public propertySpace Gets the color space in which the current color is defined.
Top
Methods
 NameDescription
Public methodEquals(Object) Determines whether the specified Object is equal to this PdfColor instance.
(Overrides ValueTypeEquals(Object))
Public methodEquals(PdfColor) Determines whether the other PdfColor is equal to this PdfColor instance.
Public methodStatic memberFromCmyk Creates a new PdfColor structure in DeviceCMYK color space by using the specified cyan, magenta, yellow and black values.
Public methodStatic memberFromGray Creates a new PdfColor structure in DeviceGray color space by using the specified gray value.
Public methodStatic memberFromPattern(PdfPattern) Creates a new PdfColor structure in Pattern color space by using the specified PdfPattern.
Public methodStatic memberFromPattern(PdfColorSpace, PdfPattern, Double) Creates a new PdfColor structure in Pattern color space by using the specified uncolored tiling PdfPattern and colorant values.
Public methodStatic memberFromRgb Creates a new PdfColor structure in DeviceRGB color space by using the specified red, green and blue values.
Public methodGetHashCode Returns a hash code for this PdfColor instance.
(Overrides ValueTypeGetHashCode)
Public methodToString Returns a String that represents this PdfColor instance.
(Overrides ValueTypeToString)
Public methodTryGetRgb Gets the red, green and blue values of this PdfColor.
Top
Operators
 NameDescription
Public operatorStatic memberEquality(PdfColor, PdfColor) Determines whether first and second PdfColors are equal.
Public operatorStatic memberInequality(PdfColor, PdfColor) Determines whether first and second PdfColors are not equal.
Top
See Also