Skip to content
Hunter Close edited this page Aug 17, 2018 · 16 revisions

Colors are represented in GlowScript code as vectors, according to an RGB model.

color picker

The color picker block is a visual representation of a set of three numbers that specify the color.

Click on the rectangle of color inside the color block to reveal some easily accessible color options in the color picker.

color picker

color is a vector, in a way

The body of the color block is blue, like the vector block, because the color data is actually managed as a vector.

In the examples below, to print the colors white and red means to print the vector code for each color.

print white

The printed result is:

<1, 1, 1>

print red

The printed result is:

<1, 0, 0>

GlowScript help for color

texture

Click on the current texture to reveal a menu of available textures.

textures

GlowScript help for textures

scene color

The scene color block sets the color of the background in the 3D object display. Click on the colored rectangle to reveal some easily accessible color options in the color picker.

scene color picker

Alternatively, a numerical vector may be attached to the scene color block in place of the color picker block. Use this option if you know the RGB code for the precise color you want, especially if this color is not available in the color picker block.

scene color vector

Example:

This RGB vector results in a raspberry-beret color.

GlowScript help for scene / canvas

Clone this wiki locally