Class Color
A color compatible with SDS2's colors. This object
knows how to translate to and from SDS2 pen numbers. It works on a
0-255 rgba color scale.
Assembly: DesignData.SDS2.Primitives.dll
Syntax
public sealed class Color
Constructors
Color(PenColor)
Create a color from the PenColor
Declaration
public Color(PenColor pen)
Parameters
Color(int, int, int, int)
Create a color from rgba values, from 0-255
Declaration
public Color(int red, int green, int blue, int alpha = 255)
Parameters
Color(string)
Create a color from a hash or pound string, like in html: "#E6E6FA"
Declaration
public Color(string poundcolor)
Parameters
Type |
Name |
Description |
string |
poundcolor |
|
Methods
Equals(object)
A color compatible with SDS2's colors. This object
knows how to translate to and from SDS2 pen numbers. It works on a
0-255 rgba color scale.
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
object |
other |
|
Returns
Overrides
~Color()
A color compatible with SDS2's colors. This object
knows how to translate to and from SDS2 pen numbers. It works on a
0-255 rgba color scale.
Declaration
GetHashCode()
A color compatible with SDS2's colors. This object
knows how to translate to and from SDS2 pen numbers. It works on a
0-255 rgba color scale.
Declaration
public override int GetHashCode()
Returns
Overrides
GetNearestPen()
Get the closest pen for this color. This is primarily used
internally in SDS2 for pen plotter support.
Declaration
public PenColor GetNearestPen()
Returns
ToString()
Get the pound or hash string value of this color
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(Color, Color)
A color compatible with SDS2's colors. This object
knows how to translate to and from SDS2 pen numbers. It works on a
0-255 rgba color scale.
Declaration
public static bool operator ==(Color a, Color b)
Parameters
Returns
operator !=(Color, Color)
A color compatible with SDS2's colors. This object
knows how to translate to and from SDS2 pen numbers. It works on a
0-255 rgba color scale.
Declaration
public static bool operator !=(Color a, Color b)
Parameters
Returns