w3schools    w3Schools
Search :
   
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
ADVERTISEMENTS

XML Certification
Download XML editor
Custom Programming
 
Table of contents
VBScript Tutorial
VB HOME
VB Introduction
VB How to
VB Where to
VB Variables
VB Procedures
VB Conditional
VB Looping
VB Summary

Examples
VB Examples

References
VB Functions
VB Keywords

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

Browse Tutorials
 

VBScript RGB Function


VBScript Reference Complete VBScript Reference

The RGB function returns a number that represents an RGB color value.

Syntax

RGB(red,green,blue)

Parameter Description
red Required. A number from 0 to 255, inclusive, representing the red component of the color
green Required. A number from 0 to 255, inclusive, representing the green component of the color
blue Required. A number from 0 to 255, inclusive, representing the blue component of the color

Example 1

document.write(rgb(255,0,0))
Output:
255

Example 2

document.write(rgb(255,30,30))
Output:
1974015


VBScript Reference Complete VBScript Reference