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: 23.18.9504.3877 (23.18.9504.3877)
Syntax
C#
[SerializableAttribute] [PersistenceVersionAttribute(17, 0)] 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].
|
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.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Returns the hash code for this instance. (Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (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.
|
Extension Methods
Name | Description | |
---|---|---|
ToColor |
Creates a font from current settings.
(Defined by DrawingStyleExtensions.) |
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.
|
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.
|
Explicit Interface Implementations
Name | Description | |
---|---|---|
ISerializableGetObjectData | Populates a SerializationInfo with the data needed to serialize the target object. |
Version Information
See Also