Name

RGB Function — Microsoft.VisualBasic.Information

Synopsis

RGB(red, green, blue)
red required; Integer

A number between 0 and 255, inclusive

green required; Integer

A number between 0 and 255, inclusive

blue required; Integer

A number between 0 and 255, inclusive

Return Value

An Integer representing the RGB color value

Description

Returns a system color code that can be assigned to object color properties. The RGB color value represents the relative intensity of the red, green, and blue components of a pixel that produces a specific color on the display. The RGB function assumes any argument greater than 255 to be 255.

The following table demonstrates how the individual color values combine to create certain colors:

Color

Red

Green

Blue

Black

0

0

0

Blue

0

0

255

Green

0

255

0

Red

255

0

0

White

255

255

255

Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.