RGB Function

Syntax

RGB(red, green, blue)

Group

Miscellaneous

Description

Return a color. Some useful color constants are predefined:

  • vbBlack - same as RGB(0,0,0)
  • vbRed - same as RGB(255,0,0)
  • vbGreen - same as RGB(0,255,0)
  • vbYellow - same as RGB(255,255,0)
  • vbBlue - same as RGB(0,0,255)
  • vbMagenta - same as RGB(255,0,255)
  • vbCyan - same as RGB(0,255,255)
  • vbWhite - same as RGB(255,255,255)

Example


Sub Main
    Debug.Print Hex(RGB(255,0,0)) '"FF0000"
End Sub

See also

QBColor( )