Routines (alphabetical) > Object Classes > Graphics Object Classes > IDLgrPalette::GetRGB

# IDLgrPalette::GetRGB

Syntax | Arguments | Keywords | Version History

The IDLgrPalette::GetRGB function method returns the RGB values contained in the palette at the given index. The returned value is a three-element vector of the form [red, green, blue].

## Syntax

Result = Obj->[IDLgrPalette::]GetRGB(Index)

## Return Value

Returns the RGB values contained in the palette at the given index.

## Arguments

### Index

The index whose RGB values are desired. This value should be in the range of 0 ≤ Index < N_COLORS, where N_COLORS is the number of elements in the color palette, as returned by the N_COLORS keyword to the IDLgrPalette:GetProperty method.

## Keywords

None

## Version History

5.0 | Introduced