User Tools

Site Tools


api:dk11:net:tatukgis.ndk.tgis_color

TGIS_Color record

DK11 for .NET | TatukGIS.NDK.TGIS_Color | Records | Fields | Methods | Properties

Platform independent color declaration.

Available also on: Delphi | Java | ActiveX.

Syntax

// C#
public struct TGIS_Color
{
}
' VisualBasic
Public Structure TGIS_Color
End Structure
// Oxygene
type
  TGIS_Color = public record
  end;

Fields

Inherited Protected
Name Visibility Description
ARGB public Internal representation as little endian ARGB integer.

Methods

Inherited Overrides Protected
Name Visibility Description
FromABGR public Create color from integer in ABGR form (Alpha Blue Green Red).
FromAHSL public Create color from Alpha Hue Saturation Lumination elements.
FromARGB(byte, byte, byte, byte) public Create color from Alpha Red Green Blue elements.
FromARGB(uint) public Create color from integer in ABGR form (Alpha Red Green Blue).
FromBGR(byte, byte, byte) public Create color from Blue Green Red elements.
FromBGR(uint) public Create color from integer in BGR form (Blue Green Red).
FromHSL public Create color from Hue Saturation Lumination elements.
FromRGB(byte, byte, byte) public Create color from Red Green Blue elements.
FromRGB(uint) public Create color from integer in RGB form (Red Green Blue).
ToABGR public Convert color to integer in ABGR form.
ToAHSL public Retrieve the hue (H), saturation (S) and lightness (L) of the current color.
ToARGB public Convert color to integer in ABGR form.
ToBGR public Convert color to integer in BGR form.
ToHSL public Retrieve the hue (H), saturation (S) and lightness (L) of the current color.
ToHSV public Retrieve the hue (H), saturation (S) and value/brightness (V/B) of the current color.
ToRGB public Convert color to integer in RGB form.

Properties

Inherited Protected
Name Visibility Description
A public Extracts Alpha part of color ARGB definition.
Aqua public Construct standard color - $ff00ffff.
B public Extracts Blue part of ARGB color definition.
Black public Construct standard color - $ff000000.
Blue public Construct standard color - $ff0000ff.
Crazy public Construct standard color - $00010816.
DimGray public Construct standard color - $ff696969.
Fuchsia public Construct standard color - $ffff00ff.
G public Extracts Green part of ARGB color definition.
Gray public Construct standard color - $ff808080.
Green public Construct standard color - $ff008000.
H public Extracts Hue part of HSL color definition.
L public Extracts Luminescence part of HSL color definition.
LightGray public Construct standard color - $ffd3d3d3.
Lime public Construct standard color - $ff00ff00.
Maroon public Construct standard color - $ff800000.
Navy public Construct standard color - $ff000080.
None public Construct standard color.
Olive public Construct standard color - $ff808000.
Purple public Construct standard color - $ff800080.
R public Extract Red part of ARGB color definition.
Red public Construct standard color - $ffff0000.
RenderColor public Construct standard color - $00ff9933.
S public Extracts Saturation part of HSL color definition.
Silver public Construct standard color - $ffc0c0c0.
Teal public Construct standard color - $ff008080.
White public Construct standard color - $ffffffff.
Yellow public Construct standard color - $ffffff00.

Remarks

TGIS_Color is a platform independent color definition used by TatukGIS Developer Kernel. It is defined as little endian ARGB.

DWORD
bits 31..24 bits 23..16 bits 15..8 bits 7..0
A R G B

Where:

Symbol Name Min Max Comments
A Alpha 0 255 0 means fully transparent; 255 means solid
R Red 0 255
G Green 0 255
B Blue 0 255

Sample colors:

Hex color Comments
$00000000 Black
$00FFFFFF Pure Red
$00FF0000 Pure Red
$0000FF00 Pure Green
$000000FF Pure Blue
$FF000000 Fully transparent; color has no meaning
$80000000 50% transparent black

Read more at http://en.wikipedia.org/wiki/RGBA_color_space.

Each platform has defined conversion functions to convert to/from the actual platform-specific color definition. See TGIS_FrameworkUtils.

References

2019/10/11 01:16