mozilla
Your Search Results

    Screen.colorDepth

    Returns the color depth of the screen.

    Syntax

    bitDepth = window.screen.colorDepth
    

    Example

    // check the color depth of the screen
    if ( window.screen.colorDepth < 8) {
      // use low-color version of page
    } else { 
      // use regular, colorful page
    }
    

    Specification

    CSSOM View

    See also

    Document Tags and Contributors

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