Table of Contents

Struct PdfColor

Namespace
PdfEngine.Vector
Assembly
PdfEngine.Abstractions.dll

Color representation in PDF vector operations, normalized to [0.0, 1.0].

public readonly record struct PdfColor : IEquatable<PdfColor>
Implements
Inherited Members

Constructors

PdfColor(float, float, float, float)

Color representation in PDF vector operations, normalized to [0.0, 1.0].

public PdfColor(float R, float G, float B, float A = 1)

Parameters

R float
G float
B float
A float

Fields

Black

public static readonly PdfColor Black

Field Value

PdfColor

Transparent

public static readonly PdfColor Transparent

Field Value

PdfColor

White

public static readonly PdfColor White

Field Value

PdfColor

Properties

A

public float A { get; init; }

Property Value

float

B

public float B { get; init; }

Property Value

float

G

public float G { get; init; }

Property Value

float

R

public float R { get; init; }

Property Value

float

Methods

FromCmyk(float, float, float, float, float)

public static PdfColor FromCmyk(float c, float m, float y, float k, float alpha = 1)

Parameters

c float
m float
y float
k float
alpha float

Returns

PdfColor

FromGray(float, float)

public static PdfColor FromGray(float gray, float alpha = 1)

Parameters

gray float
alpha float

Returns

PdfColor

FromRgb(float, float, float, float)

public static PdfColor FromRgb(float r, float g, float b, float alpha = 1)

Parameters

r float
g float
b float
alpha float

Returns

PdfColor