The pixelDepth property gets the number of bits per pixel of the user's screen.
<html> <script language="JavaScript1.2"> <!-- document.write("The pixel depth of this user's screen is <b>"); document.write(screen.pixelDepth + '</b> bit'); --> </script> </html>