Your Search Results

    Screen.pixelDepth

    « Screen

    Summary

    Returns the bit depth of the screen.

    Syntax

    depth = window.screen.pixelDepth
    

    Example

    // if there is not adequate bit depth
    // choose a simpler color
    if ( window.screen.pixelDepth > 8 ) {
      document.style.color = "#FAEBD7";
    } else {
      document.style.color = "#FFFFFF";
    }
    

    Specification

    DOM Level 0. Not part of any standard.

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy, chitra_lakhotia, Mgjbot, ethertank, Gor1, teoli
    Last updated by: teoli,