SharpDX.Direct2D1.Color

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > SharpDX SDK Reference > SharpDX >

SharpDX.Direct2D1.Color

Previous page Return to chapter overview Next page

Show/Hide Hidden Text

Disclaimer: The SharpDX SDK Reference section was compiled from the official SharpDX Documentation and was NOT authored by NinjaTrader.  The contents of this section are provided as-is and only cover a fraction of what is available from the SharpDX SDK.  This page was intended only as a reference guide to help you get started with some of the 2D Graphics concepts used in the NinjaTrader.Custom assembly.  Please refer to the official SharpDX Documentation for additional members not covered in this reference.  For more seasoned graphic developers, the original MSDN Direct2D1 and DirectWrite unmanaged API documentation can also be helpful for understanding the DirectX/Direct2D run-time environment. For NinjaScript development purposes, we document only essential members in the structure of this page.

 

 

Definition

Represents a 32-bit color (4 bytes) in the form of RGBA (in byte order: R, G, B, A).

 

Notes:  

1.The color of each pixel is represented as a 32-bit number: 8 bits each for alpha, red, green, and blue (ARGB). Each of the four components is a number from 0 through 255, with 0 representing no intensity and 255 representing full intensity. The alpha component specifies the transparency of the color: 0 is fully transparent, and 255 is fully opaque. To determine the alpha, red, green, or blue component of a color, use the A, R, G, or B property, respectively.

2.Named colors are represented by using the properties of the Color structure.  Please see the table of Static Named Colors below

 

Syntax

struct Color

 
Constructors        

new Color()

Initializes a new instance of the Color struct

new Color(float red, float green, float blue)

Initializes a new instance of the Color struct using float values

new Color(float red, float green, float blue, float alpha)

Initializes a new instance of the Color struct using float values with alpha transparency

new Color(int red, int green, int blue)

Initializes a new instance of the Color struct using int values

new Color(int red, int green, int blue, int alpha)

Initializes a new instance of the Color struct using int values with alpha transparency

new Color(byte red, byte green, byte blue)

Initializes a new instance of the Color struct using byte values

new Color(byte red, byte green, byte blue, byte alpha)

Initializes a new instance of the Color struct using byte values with alpha transparency

 

 

Methods and Properties

R

The red component of the color

G

The green component of the color

B

The blue component of the color

A

The alpha component of the color

ToColor3()

Converts the color into a three component color

ToColor4()

Converts the color into a four component color

 

tog_minus        Static Named Colors