ArgbColor
Contents
[
Hide
]
ArgbColor structure
Represents one color value in ARGB format with converters and serializers
public struct ArgbColor : ICssDataType, IEquatable<ArgbColor>
Properties
Name | Description |
---|---|
A { get; } | Gets the alpha part of the color. |
Alpha { get; } | Gets the alpha part of the color in percent (0..1). |
B { get; } | Gets the blue part of the color. |
G { get; } | Gets the green part of the color. |
IsEmpty { get; } | Uninitialized color - all 4 channels are set to 0. Same as Default and Transparent. |
IsFullyOpaque { get; } | Indicates whether this ArgbColor instance is fully opaque, without transparency (its Alpha channel has max value) |
IsFullyTransparent { get; } | Indicates whether this ArgbColor instance is fully transparent - its Alpha channel has the min (0) value, so other R, G, and B channels has no visible effect. |
IsTranslucent { get; } | Indicates whether this ArgbColor instance is translucent (not fully transparent, but also not fully opaque) |
R { get; } | Gets the red part of the color. |
Value { get; } | Gets the Int32 value of the color. |
Methods
Name | Description |
---|---|
static FromRgb(byte, byte, byte) | Creates one ArgbColor value from specified Red, Green, Blue channels, while Alpha channel is fully opaque |
static FromRgba(byte, byte, byte, byte) | Creates one ArgbColor value from specified Red, Green, Blue, and Alpha channels |
static FromSingleValueRgb(byte) | Creates a fully opaque (A=255) color from single value, which will be applied to all channels |
Equals(ArgbColor) | Checks two ArgbColor colors for equality |
override Equals(object) | Tests if another object is equal to this ArgbColor instance. |
override GetHashCode() | Returns a hash code that defines the current color. |
SerializeDefault() | Serializes this ArgbColor instance to the most appropriate CSS function notation depending on translucency |
ToRGB() | Serializes this ArgbColor instance to the ‘rgb’ CSS function notation |
ToRGBA() | Serializes this ArgbColor instance to the ‘rgba’ CSS function notation |
override ToString() | Same as SerializeDefault |
operator == | Compares two colors and returns a boolean indicating if the two do match. |
operator != | Compares two colors and returns a boolean indicating if the two do not match. |
Other Members
Name | Description |
---|---|
static class KnownColors | Contains all “known colors”, that have fixed unique name and value in CSS standart |
Remarks
This type is designed to be useful for (but not limited to) CSS operations. See more: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
See Also
- interface ICssDataType
- namespace GroupDocs.Editor.HtmlCss.Css.DataTypes
- assembly GroupDocs.Editor