---
name: "glGetColorTableParameter"
section: "3x"
platform: "linux"
package: "xlibmesa-gl-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/glGetColorTableParameter"
---

# glGetColorTableParameter(3x)

get color lookup table parameters

## NAME

**glGetColorTableParameterfv, glGetColorTableParameteriv** - get color lookup table parameters

## C SPECIFICATION

void **glGetColorTableParameterfv**( GLenum *target*,

```
	GLenum pname,
	GLfloat *params )
```

void **glGetColorTableParameteriv**( GLenum *target*,

```
	GLenum pname,
	GLint *params )
```

delim $$

## PARAMETERS

- *target*

  The target color table. Must be **GL\_COLOR\_TABLE**, **GL\_POST\_CONVOLUTION\_COLOR\_TABLE**, **GL\_POST\_COLOR\_MATRIX\_COLOR\_TABLE**, **GL\_PROXY\_COLOR\_TABLE**, **GL\_PROXY\_POST\_CONVOLUTION\_COLOR\_TABLE**, **GL\_PROXY\_POST\_COLOR\_MATRIX\_COLOR\_TABLE**.

- *pname*

  The symbolic name of a color lookup table parameter. Must be one of **GL\_COLOR\_TABLE\_BIAS**, **GL\_COLOR\_TABLE\_SCALE**, **GL\_COLOR\_TABLE\_FORMAT**, **GL\_COLOR\_TABLE\_WIDTH**, **GL\_COLOR\_TABLE\_RED\_SIZE**, **GL\_COLOR\_TABLE\_GREEN\_SIZE**, **GL\_COLOR\_TABLE\_BLUE\_SIZE**, **GL\_COLOR\_TABLE\_ALPHA\_SIZE**, **GL\_COLOR\_TABLE\_LUMINANCE\_SIZE**, or **GL\_COLOR\_TABLE\_INTENSITY\_SIZE**.

- *params*

  A pointer to an array where the values of the parameter will be stored.

## DESCRIPTION

Returns parameters specific to color table *target*.

When *pname* is set to **GL\_COLOR\_TABLE\_SCALE** or **GL\_COLOR\_TABLE\_BIAS**, **glGetColorTableParameter** returns the color  table scale or bias parameters for the table specified by *target*. For these queries, *target* must be set to **GL\_COLOR\_TABLE**, **GL\_POST\_CONVOLUTION\_COLOR\_TABLE**, or **GL\_POST\_COLOR\_MATRIX\_COLOR\_TABLE** and *params* points to an array of four elements, which receive the scale or bias factors for red, green, blue, and alpha, in that order.

**glGetColorTableParameter** can also be used to retrieve the  and size parameters for a color table. For these queries, set *target* to either the color table target or the proxy color table target. The  and size parameters are set by **glColorTable**.

The following table lists the  and size parameters that may be queried. For each symbolic constant listed below for *pname*,  *params* must point to an array of the  given length, and receive the values indicated.

| | | |
| --- | --- | --- |
| **Parameter** | **N** | **Meaning** |
| **GL\_COLOR\_TABLE\_FORMAT** | 1 | Internal (e.g. **GL\_RGBA**) |
| **GL\_COLOR\_TABLE\_WIDTH** | 1 | Number of elements in table |
| **GL\_COLOR\_TABLE\_RED\_SIZE** | 1 | Size of red component, in bits |
| **GL\_COLOR\_TABLE\_GREEN\_SIZE** | 1 | Size of green component |
| **GL\_COLOR\_TABLE\_BLUE\_SIZE** | 1 | Size of blue component |
| **GL\_COLOR\_TABLE\_ALPHA\_SIZE** | 1 | Size of alpha component |
| **GL\_COLOR\_TABLE\_LUMINANCE\_SIZE** | 1 | Size of luminance component |
| **GL\_COLOR\_TABLE\_INTENSITY\_SIZE** | 1 | Size of intensity component |

## NOTES

**glGetColorTableParameter** is present only if **GL\_ARB\_imaging** is returned when **glGetString** is called with an argument of **GL\_EXTENSIONS**.

## ERRORS

**GL\_INVALID\_ENUM** is generated if *target* or *pname* is not an acceptable value.

**GL\_INVALID\_OPERATION** is generated if **glGetColorTableParameter** is executed between the execution of **glBegin** and the corresponding execution of **glEnd**.

## SEE ALSO

**glColorTable(3G)**, **glTexParameter(3G)**, **glColorTableParameter(3G)**
