Struct MailDocumentColour
- Namespace
- MailFathom.Application.EmailContent.Rendering.Document
- Assembly
- MailFathom.Application.dll
One opaque colour a message asked for, as three channels.
[JsonConverter(typeof(MailDocumentColourJsonConverter))]
public readonly record struct MailDocumentColour : IEquatable<MailDocumentColour>
- Implements
- Inherited Members
Remarks
A colour rather than a CSS colour value: whatever notation the message wrote — a keyword, three or six hexadecimal
digits, or an rgb() function — is resolved during the reduction and what crosses the wire is three numbers.
So a client parses nothing, and a notation nobody implemented cannot arrive as text a renderer would have to decide
about.
Opaque deliberately. Alpha would let a message make its own text invisible against the pane it is drawn in, which is a legibility decision the pane keeps rather than one a sender takes, and a translucent background would compose with whichever theme the reader is in rather than with the one the sender assumed.
Constructors
- MailDocumentColour(byte, byte, byte)
One opaque colour a message asked for, as three channels.
Properties
- Blue
The blue channel.
- Green
The green channel.
- Notation
Gets the colour in the
#rrggbbnotation the wire uses.
- Red
The red channel.
Methods
- ToString()
Returns the fully qualified type name of this instance.
- TryParse(string?, out MailDocumentColour)
Parses the
#rrggbbnotation the wire uses.