- Main Page
- Packages
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# smjg.libs.sdwf.colour.RGBColour Union Reference

The smjg.libs.sdwf.colour.RGBColour union represents a colour stored in 24-bit RGB. More...

List of all members.

## Static Public Member Functions
Pseudo-Constructors
static RGBColour | opCall (uint value)
| Constructs a new RGBColour from a `COLORREF` value.
static RGBColour | opCall (ubyte red, ubyte green, ubyte blue)
| Constructs a new RGBColour from RGB components.
static RGBColour | opCall (COLOUR systemColour)
| Constructs a new RGBColour from an element of the Windows colour scheme.
## Public Attributes
uint | value
| Numerical representation of the whole colour.
ubyte | red
ubyte | green
ubyte | blue
## Static Public Attributes
static const RGBColour | BLACK = { value: 0x00000000 } static
static const RGBColour | RED = { value: 0x000000ff } static
static const RGBColour | GREEN = { value: 0x0000ff00 } static
static const RGBColour | YELLOW = { value: 0x0000ffff } static
static const RGBColour | BLUE = { value: 0x00ff0000 } static
static const RGBColour | MAGENTA = { value: 0x00ff00ff } static
static const RGBColour | CYAN = { value: 0x00ffff00 } static
static const RGBColour | WHITE = { value: 0x00ffffff } static
static const RGBColour | DARK_GREY = { value: 0x00808080 } static
static const RGBColour | LIGHT_GREY = { value: 0x00c0c0c0 } static
static const RGBColour | DARK_RED = { value: 0x00000080 } static
static const RGBColour | DARK_GREEN = { value: 0x00008000 } static
static const RGBColour | DARK_YELLOW = { value: 0x00008080 } static
static const RGBColour | DARK_BLUE = { value: 0x00800000 } static
static const RGBColour | DARK_MAGENTA = { value: 0x00800080 } static
static const RGBColour | DARK_CYAN = { value: 0x00808000 }
static typedef DARK_GREY | DARK_GRAY
static typedef LIGHT_GREY | LIGHT_GRAY

## Detailed Description

The smjg.libs.sdwf.colour.RGBColour union represents a colour stored in 24-bit RGB.

This type is a wrapper around the Windows API `COLORREF` data type. It is not compatible with the API `RGBTRIPLE` and `RBGQUAD` structures, since the component order of these is inconsistent with `COLORREF`.

Status:
  done

## Member Function Documentation

static RGBColour smjg.libs.sdwf.colour.RGBColour.opCall | ( | uint | value | ) | `[static]`

Constructs a new RGBColour from a `COLORREF` value.

Parameters:

  | value | numerical value of the colour, in the format of the Windows `COLORREF` type.

Returns:
  RGBColour object representing the specified colour.

Status:
  done

static RGBColour smjg.libs.sdwf.colour.RGBColour.opCall | ( | ubyte | red,
|  | ubyte | green,
|  | ubyte | blue |
| ) |  |  | `[static]`

Constructs a new RGBColour from RGB components.

Parameters:

  | red | red component.
  | green | green component.
  | blue | blue component.

Returns:
  RGBColour object representing the specified colour.

Status:
  done

static RGBColour smjg.libs.sdwf.colour.RGBColour.opCall | ( | COLOUR | systemColour | ) | `[static]`

Constructs a new RGBColour from an element of the Windows colour scheme.

Parameters:

  | systemColour | identifier of the colour scheme element whose colour is to be retrieved.

Returns:
  RGBColour object representing the specified colour.

Status:
  done

## Member Data Documentation

ubyte smjg.libs.sdwf.colour.RGBColour.red

ubyte smjg.libs.sdwf.colour.RGBColour.green

ubyte smjg.libs.sdwf.colour.RGBColour.blue

uint smjg.libs.sdwf.colour.RGBColour.value

Numerical representation of the whole colour.

You would use this value in any Windows API function or structure expecting a `COLORREF`. The most significant byte of this value must always be zero.

Since:
  0.59 (previously called ref)

Status:
  done

const RGBColour smjg.libs.sdwf.colour.RGBColour.BLACK = { value: 0x00000000 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.RED = { value: 0x000000ff } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.GREEN = { value: 0x0000ff00 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.YELLOW = { value: 0x0000ffff } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.BLUE = { value: 0x00ff0000 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.MAGENTA = { value: 0x00ff00ff } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.CYAN = { value: 0x00ffff00 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.WHITE = { value: 0x00ffffff } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.DARK_GREY = { value: 0x00808080 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.LIGHT_GREY = { value: 0x00c0c0c0 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.DARK_RED = { value: 0x00000080 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.DARK_GREEN = { value: 0x00008000 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.DARK_YELLOW = { value: 0x00008080 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.DARK_BLUE = { value: 0x00800000 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.DARK_MAGENTA = { value: 0x00800080 } static`[static]`

const RGBColour smjg.libs.sdwf.colour.RGBColour.DARK_CYAN = { value: 0x00808000 }`[static]`

typedef DARK_GREY smjg.libs.sdwf.colour.RGBColour.DARK_GRAY`[static]`

typedef LIGHT_GREY smjg.libs.sdwf.colour.RGBColour.LIGHT_GRAY`[static]`

The documentation for this union was generated from the following file:

- colour.d