Explore BrainMass

Java - color value

25-In HTML, a color can be coded in the following hexadecimal notation: #rrggbb, where:

rr represent the amount of red in color
gg represent the amount of green in color
bb represent the amount of blue in the color
rr, gg, and bb vary between 00 and FF in hexadecimal notation, i.e., 0 and 255 in decimal equivalent notation.

Give the decimal values of red, green, and blue values in the color# 33AB12.

Solution Preview

Since the color value is presented as #rrggbb, the value #33AB12 indicates that the red (rr) value is 33, the green value (gg) is AB, and the blue value (bb) is 12. All of these values are in hexadecimal notation. Hexadecimal notation is a way of writing base-16 numbers. A base-16 number uses 16 values in each digit slot. These are the digits 0 - 9 and letters A - F. The letter A is equivalent ...