QBColor() and RGB() Function in MS Access
Last Updated :
27 Sep, 2021
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 returns 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
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...