RGB |
RGB(red, blue, green) |
Returns the number representing an RGB colour value (Long). |
red | The red component of the colour (Integer). |
blue | The blue component of the colour (Integer). |
green | The green component of the colour (Integer). |
REMARKS |
* The "red" is an integer between 0-255, inclusively. * If "red", "blue" or "green" > 255, then 255 is used. * The colour values returned by this function are not compatible with those used on the Macintosh. * The equivalent .NET function is Microsoft.VisualBasic.Information.Rgb * For the Microsoft documentation refer to learn.microsoft.com |
Debug.Print RGB(0, 0, 0) '= 0 = Black
Debug.Print RGB(0, 0, 255) '= 16711680 = Blue
Debug.Print RGB(0, 255, 0) '= 65280 = Cyan
Debug.Print RGB(0, 255, 255) '= 16776960 = Green
Debug.Print RGB(255, 0, 0) '= 255 = Red
Debug.Print RGB(255, 0, 255) '= 16711935 = Magenta
Debug.Print RGB(255, 255, 0) '= 65535 = Yellow
Debug.Print RGB(255,255,255) '= 16777215 = White
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top