[Overview][Types][Procedures and functions][Variables][Index] | Reference for unit 'LCLIntf' (#lcl)

# RGB

Combines Red, Green and Blue values into an TColorRef value.

## Declaration

Source position: winapih.inc line 350

`function RGB(`
`R: Byte;`
`G: Byte;`
`B: Byte`
`):TColorRef;`

## Arguments

`R` |  | The value of the red channel. zero indicates no contribution, 255 indicates a full red channel.
`G` |  | The value of the green channel.
`B` |  | The value of the blue channel.

## Function result

The combined COLORREF created with the given color channels.

## Description

The bytes are shifted into place, following the format $00bbggrr, which is the format of the Windows API type COLORREF. Their actual physical order depends on the endian-ness of the machine.