QBColor() and RGB() Function in MS Access

1. QBColor() Function :
QBColor() Function in MS Access is used to get the RGB color code .It returns a Long number representing the RGB color code corresponding to the specified color number.

Syntax :

QBColor (color)

Parameter : This method accepts one parameter as mentioned above and described below :

  • color : It is a whole number in the range 0–15.

Returns : It reurns RGB color code.

Example-1 : RGB color code of White whose color number is 7.



SELECT  QBColor( 7);

Output :

12632256 

Example-2 : RGB color code of Green whose color number is 2.

SELECT  QBColor( 2);

Output :

32768 

2. RGB () Function :
RGB() Function in MS Access is used to get a Long number which represents an RGB color value.

Syntax :

RGB (red, green, blue)

Parameter : This method accepts three parameter as mentioned above and described below :

  • red : It represents the red component of the color. It is an Integer Number in the range 0–255(inclusive).
  • green : It represents green red component of the color. It is an Integer Number in the range 0–255(inclusive).
  • blue : It represents the blue component of the color. It is an Integer Number in the range 0–255(inclusive).

Returns : It returns RGB color value.

Example-1 : RGB color value for White whose red value is 255, green value is 255 and blue value is 255.

SELECT  RGB(255, 255, 255);

Output :

16777215 

Example-2 : RGB color code of Green whose red value is 0, green value is 255 and blue value is 0.

SELECT  RGB(0, 255, 0);

Output :

65280 
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.