SpreadsheetGear 2017
Color Structure
Members  Example 

SpreadsheetGear.Drawing Namespace : Color Structure
Represents a Color in the SpreadsheetGear GDI+ drawing engine and provides implicit conversion operators to and from SpreadsheetGear.Color and System.Drawing.Color as well as static converters between SpreadsheetGear.Color and System.Drawing.Color.
Object Model
Color Structure
Public Structure Color 
   Inherits System.ValueType
Dim instance As Color
public struct Color : System.ValueType 
public type Color = class(System.ValueType)
In JScript, you can use structures in other assemblies, but you cannot define your own.
public __value struct Color : public System.ValueType 
public value class Color : public System.ValueType 
This example demonstrates converting between Color types and requires references to:
// Get a new SpreadsheetGear.Color from the readonly list of colors in SpreadsheetGear.Colors
SpreadsheetGear.Color sgColor = SpreadsheetGear.Colors.Navy;
// Use the SpreadsheetGear.Drawing.Color implicit converters to
// get instances of SpreadsheetGear.Drawing.Color and System.Drawing.Color.
SpreadsheetGear.Drawing.Color sgDrawingColor = sgColor;
System.Drawing.Color systemColor = sgDrawingColor;
// Use the implicit converters to go the other way.
SpreadsheetGear.Drawing.Color sgDrawingColor2 = systemColor;
SpreadsheetGear.Color sgColor2 = sgDrawingColor2;
// Use the static converters between SpreadsheetGear.Color and System.Drawing.Color
SpreadsheetGear.Drawing.Color sgColor3 = SpreadsheetGear.Drawing.Color.GetSpreadsheetGearColor(systemColor);
System.Drawing.Color systemColor2 = SpreadsheetGear.Drawing.Color.GetDrawingColor(sgColor);
Console.WriteLine(" sgColor ={0}\r\n sgColor2s{1}\r\n sgColor3={2}", sgColor, sgColor2, sgColor3);
Console.WriteLine(" sgDrawingColor ={0}\r\n sgDrawingColor2s{1}", sgDrawingColor, sgDrawingColor2);
Console.WriteLine(" systemColor ={0}\r\n systemColor2s{1}", systemColor, systemColor2);
Inheritance Hierarchy



Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also


Color Members
SpreadsheetGear.Drawing Namespace