Represents a color with three bytes for the r,g,b components and a float for alpha.
Namespace: Spotfire.Dxp.Framework.Styles
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 69.0.21424.2902 (69.0.21424.2902)
Syntax
C#
[SerializableAttribute] [PersistenceVersionAttribute(17, 0)] [JsonObjectAttribute] public struct ColorInfo : ISerializable, IEquatable<ColorInfo>
The ColorInfo type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| ColorInfo(Int32) |
Initializes a new instance of the ColorInfo struct from an integer value.
| |
| ColorInfo(ColorInfo, Single) |
Initializes a new instance of the ColorInfo struct using another one as source
but with a new alpha. Clamps the alpha to [0, 1].
| |
| ColorInfo(Int32, Int32, Int32) |
Initializes a new instance of the ColorInfo struct.
Clamps the color components to the range [0, 255] and sets alpha to 1.
| |
| ColorInfo(Byte, Byte, Byte, Byte) |
Initializes a new instance of the ColorInfo struct.
| |
| ColorInfo(Byte, Byte, Byte, Single) |
Initializes a new instance of the ColorInfo struct.
Clamps the alpha to [0, 1].
| |
| ColorInfo(Int32, Int32, Int32, Single) |
Initializes a new instance of the ColorInfo struct.
Clamps the color components to the range [0, 255] and alpha to [0, 1].
|
Properties
| Name | Description | |
|---|---|---|
| A |
Gets the alpha value of this color.
| |
| B |
Gets the blue value of this color.
| |
| G |
Gets the green value of this color.
| |
| IsOpaque |
Gets a value indicating whether this instance is completely opaque.
| |
| IsTransparent |
Gets a value indicating whether this instance is completely transparent.
| |
| R |
Gets the red value of this color.
|
Methods
| Name | Description | |
|---|---|---|
| Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object).) | |
| Equals(ColorInfo) |
Indicates whether the current object is equal to another object of the same type.
| |
| GetHashCode | Returns the hash code for this instance. (Overrides ValueTypeGetHashCode.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ToArgb |
Converts this color to an integer.
| |
| ToString | Returns the fully qualified type name of this instance. (Overrides ValueTypeToString.) |
Operators
| Name | Description | |
|---|---|---|
| Equality |
Compares two ColorInfo structures for equality.
| |
| Inequality |
Compares two ColorInfo structures for inequality.
|
Fields
| Name | Description | |
|---|---|---|
| Transparent |
Transparent color. Has all components set to zero (transparent black). Note that this is different from System.Drawing.Color.Transparent which is transparent white.
|
Extension Methods
| Name | Description | |
|---|---|---|
| ToColor |
Creates a font from current settings.
(Defined by DrawingStyleExtensions.) |
Explicit Interface Implementations
| Name | Description | |
|---|---|---|
| ISerializableGetObjectData | Populates a SerializationInfo with the data needed to serialize the target object. |
Version Information
Supported in: 14.7, 14.6, 14.5, 14.4, 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also