aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/screen/colordepth/index.html
blob: 54b776968ffe9c6412ad2d3aca7e6bdeec1d98f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
title: Screen.colorDepth
slug: Web/API/Screen/colorDepth
tags:
  - API
  - CSSOM View
  - Property
  - Reference
  - プロパティ
translation_of: Web/API/Screen/colorDepth
---
<p>{{APIRef("CSSOM")}}</p>

<p><strong><code>Screen.colorDepth</code></strong> は読み取り専用プロパティで、画面の色震度を返します。 CSSOM により、互換性の理由から <code>24</code> を返す実装もあります。そうでないものについては、ブラウザーの互換性の節を参照してください。</p>

<h2 id="Syntax" name="Syntax">構文</h2>

<pre class="syntaxbox notranslate"><var>bitDepth</var> = window.screen.colorDepth;</pre>

<h2 id="Example" name="Example"></h2>

<pre class="brush: js; notranslate">// 画面の色震度をチェック
if ( window.screen.colorDepth &lt; 8) {
  // Use low-color version of page
} else {
  // Use regular, colorful page
}
</pre>

<h2 id="Specification" name="Specification">仕様書</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">状態</th>
   <th scope="col">備考</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSSOM View', '#dom-screen-colordepth', 'Screen.colorDepth')}}</td>
   <td>{{Spec2('CSSOM View')}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>

<p>{{Compat("api.Screen.colorDepth")}}</p>

<h2 id="See_also" name="See_also">関連情報</h2>

<ul>
 <li>{{DOMxRef("Screen.pixelDepth")}}</li>
</ul>