In order to do this you need to use the screen object. This object has the following main properties:
availHeight
availLeft
availTop
availWidth
colorDepth
height
pixelDepth
width
For example screen.colorDepth returns the number of bits of the color palette used. If its value is 8, the color palette is 8 bit (256 c)