# What is the value of green and blue?

"If the R, G, and B values of some pixel in a BMP are, say, 0xff, 0x00, and 0x00 in hexadecimal, that pixel is purely red, as 0xff (otherwise known as 255 in decimal) implies "a lot of red," while 0x00 and 0x00 imply "no green" and "no blue," respectively. Given how red Mr. Boddy’s BMP is, it clearly has a lot of pixels with those RGB values. But it also has a few with other values."

I copied the above from pset4's spec. Would like to understand why 0x00 represent both "no green" and "no blue"?

• I'm not sure that I get what you're asking. Logically speaking, if you have 0 of something, this means that you do not have any of it at all!
– kzidane
Jan 12, 2015 at 15:30
• Maybe this table would help you rapidtables.com/web/color/RGB_Color.htm Jan 12, 2015 at 15:33
• In wallek's table note that 0x00 corresponds to null in hexadecimal Jan 12, 2015 at 21:10
• Thanks for the table. Another question, how do I know triple.rgbtBlue accepts a hex or dec? Jan 13, 2015 at 3:31
• All hex values can be represented by dec values. As long as you type 0x in front of the hex digits, the compiler should understand what you mean and accept it the same way as if you typed the dec version (e.g. `if (0xff == 255)` will always evaluate to true) Jan 15, 2015 at 7:23

`rgbtRed` `rgbtGreen` `rgbtBlue`
If the value of any of these triples is 0x00, then that means that color is not in the pixel. Thus, if I had an `RGBTRIPLE` named `triple` and the values of its members were as follows:
`triple.rgbtRed = 0xff;` `triple.rgbtGreen = 0x00;` `triple.rgbtBlue = 0x00;`