/ comp / gb.opengl / gl / color3f
Gl.Color3f (gb.opengl)
Syntax

    STATIC SUB Color3f ( Red AS Float, Green AS Float, Blue AS Float )

### 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.Color3f variants specify new red, green, and blue values explicitly, and set the current alpha value to 1.0 implicitly. Gl.Color4f variants specify all four color components explicitly.

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.Color3f 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