/ comp / gb.opengl / gl / color3i
Gl.Color3i (gb.opengl)
Syntax

    STATIC SUB Color3i ( Red AS Integer, Green AS Integer, Blue AS Integer )

### Set the current color

#### Parameters

- Red, Green, Blue specify new red, green, and blue values for the current color.

#### Description

The GL stores both a current single-valued color index and a current four-valued RGBA color. glColor sets a new four-valued RGBA color. gl.Color has two major variants: with 3 or 4 parameters. Gl.Color3i variants specify new red, green, and blue values explicitly, and set the current alpha value to 1.0 implicitly. Gl.Color4i variants specify all four color components explicitly.

Current color values are stored in floating-point format, with unspecified mantissa and exponent sizes. Integer color components are linearly mapped to floating-point values such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. Floating-point values are mapped directly.

Values are not clamped to the range [0, 1] before updating the current color. However, color components are clamped to this range before they are interpolated or written into a color buffer.

| The current color can be updated at any time. In particular, Gl.Color3i can be called between a call to Gl.Begin and the corresponding call to Gl.End.

#### Associated Gets

Gl.GetCurrentColor
Gl.GetRgbaMode

### See also

Gl.Indexf, Gl.Indexi