RGB = (R*65536)+(G*256)+B , (when R is RED, G is GREEN and B is BLUE) Calculation examples White RGB Color White RGB code = 255*65536+255*256+255 = #FFFFFF Blue RGB Color Blue RGB code = 0*65536+0*256+255 = #0000FF Red RGB Color Red RGB code = 255*65536+0*256+0 = #FF0000 Green RGB Color Green RGB code = 0*65536+255*256+0 = #00FF00 Gray RGB Color Gray RGB code = 128*65536+128*256+128 = #808080 Yell