PColor64 Structure

Represents a 64-bit premultiplied sRGB color where every color channel is represented by a 16-bit integer.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 9.0.0
C#
[SerializableAttribute]
public readonly struct PColor64 : IEquatable<PColor64>
Inheritance
Object    ValueType    PColor64
Implements
IEquatablePColor64

Constructors

PColor64(Color32) Initializes a new instance of the PColor64 struct from a Color32 instance.
PColor64(Color64) Initializes a new instance of the PColor64 struct from a Color64 instance.
PColor64(PColor32) Initializes a new instance of the PColor64 struct from a PColor32 instance.
PColor64(UInt16, UInt16, UInt16) Initializes a new instance of the PColor64 struct from RGB (red, green, and blue) values.
PColor64(UInt16, UInt16, UInt16, UInt16) Initializes a new instance of the PColor64 struct from ARGB (alpha, red, green, and blue) values. For performance reasons this overload does not validate the parameters but you can use the PColor64(UInt16, UInt16, UInt16, UInt16, Boolean) constructor or the IsValid property for validation, or the Clip method to return a valid instance.
PColor64(UInt16, UInt16, UInt16, UInt16, Boolean) Initializes a new instance of the PColor64 struct from ARGB (alpha, red, green, and blue) values.

Properties

IsValid Gets whether this PColor64 instance represents a valid premultiplied color. That is, when A is greater than or equal to R, G and B.

Methods

Clip Returns a valid PColor64 instance by clipping the possibly exceeding original RGB values. If IsValid returns , then the result is the same as the original instance.
Equals(Object) Determines whether the specified Object is equal to this PColor64 instance.
(Overrides ValueTypeEquals(Object))
Equals(PColor64) Determines whether the current PColor64 instance is equal to another one.
FromArgb(Int64) Creates a PColor64 structure from a 64-bit ARGB value.
FromArgb(UInt64) Creates a PColor64 structure from a 64-bit ARGB value.
FromArgb(UInt16, Color64) Creates a PColor64 instance from the specified Color64 structure specifying a custom alpha value.
GetHashCode Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode)
ToArgb Gets the 64-bit ARGB value of this PColor64 instance.
ToArgbUInt64 Gets the 64-bit ARGB value of this PColor64 instance.
ToColor32 Converts this PColor64 instance to a Color32 structure.
ToColor64 Converts this PColor64 instance to a Color64 structure. It's practically the same as calling the ToStraight(PColor64) method.
ToPColor32 Converts this PColor64 instance to a PColor32 structure.
ToString Gets the string representation of this PColor64 instance.
(Overrides ValueTypeToString)

Operators

Equality(PColor64, PColor64) Gets whether two PColor64 structures are equal.
Inequality(PColor64, PColor64) Gets whether two PColor64 structures are different.

Fields

A Gets the alpha component value of this PColor64 structure. This field is read-only.
B Gets the blue component value of this PColor64 structure. This field is read-only.
G Gets the green component value of this PColor64 structure. This field is read-only.
R Gets the red component value of this PColor64 structure. This field is read-only.

Extension Methods

Blend Blends the specified foreColor and backColor in the sRGB color space. It returns foreColor if it has no transparency (that is, when A is 65535); otherwise, the result of the blending.
(Defined by ColorExtensions)
Blend Blends the specified foreColor and backColor in the specified colorSpace. It returns foreColor if it has no transparency (that is, when A is 65535); otherwise, the result of the blending.
(Defined by ColorExtensions)
ToColor Converts this PColor64 to a Color instance.
(Defined by ColorExtensions)
ToColorF Converts this PColor64 to a ColorF instance.
(Defined by ColorExtensions)
ToColorF Converts this PColor64 to a ColorF instance.
(Defined by ColorExtensions)
TolerantEquals Gets whether two PColor64 instances are equal using a specified tolerance.
(Defined by ColorExtensions)
ToMediaColor Converts a PColor64 struct to System.Windows.Media.Color.
(Defined by ColorExtensions)
ToPColorF Converts this PColor64 to a PColorF instance.
(Defined by ColorExtensions)
ToPColorF Converts this PColor64 to a ColorF instance.
(Defined by ColorExtensions)
ToSKColor Converts a PColor64 struct to SKColor.
(Defined by ColorExtensions)
ToSKColorF Converts a PColor64 struct to SKColorF.
(Defined by ColorExtensions)
ToSKPMColor Converts a PColor64 struct to SKPMColor.
(Defined by ColorExtensions)
ToStraight Converts this premultiplied PColor64 value to a straight Color64 value. It's practically the same as calling the ToColor64 method.
(Defined by ColorExtensions)
ToStraightSafe Converts this premultiplied PColor64 instance containing possibly invalid RGB values to a straight Color64 value.
(Defined by ColorExtensions)
ToWindowsColor Converts a PColor64 struct to Windows.UI.Color.
(Defined by ColorExtensions)

See Also