목표 장치나 버퍼에서 색상에 사용되는 픽셀당 바이트 수를 반환한다.

Script[iVal=]screen.colorDepth
HTML없음
인수
iVal : (속성 정수값)
colorDepth 속성값은 픽셀당 비트수 나타내는 정수값이다.

1, 4, 8, 15, 16, 24, 32 off-screen 버퍼로 사용되는 픽셀당 비트수이다.
값이 15 이면 픽셀당 16 비트(bit)이고 15비트가 실제로 사용되며 RGB 값 배치에 각각 5 비트씩(5-5-5) 사용된다.

이 속성은 읽기전용이며 디폴트값은 없다.

특기

스크립트를 통해서 이 속성값을 반환 받는 것은 적정한 색상을 선택하여 스크린에 보낼 수 있게 해 준다.

bufferDepth0 이나 -1이면, colorDepth는 스크린이나 프린터의 픽셀당 비트수와 같다.
bufferDepth0이 아니면 colorDepthbufferDepth와 같다.

적용
개체scriptHTML규격IE
screen[iVal=]screen.colorDepth없음없음IE4.0(win16,win32,ce,unix,mac)
참고
colorDepth, bufferDepth, clientCaps.colorDepth

property
colorDepth 속성
colorDepth</b> 속성이전페이지로페이지 맨위로페이지 맨아래로

body 개체의 bottomMargin 속성 예제

screen.bufferDepth=undefined
screen.colorDepth=24
<SCRIPT>
document.write('screen.bufferDepth='+screen.bufferDepth+'<BR>');
document.write('screen.colorDepth='+screen.colorDepth+'<BR>');
</SCRIPT>
property
colorDepth 속성
견본
이전페이지로페이지 맨위로
최종 수정:
04/07/2025 01:43:57
KoXo Homepage
All right reserved
비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다.
오류가 나면 정상적 접속으로 시도해 보세요.
http://koxo.com/lang/js/property/colorDepth.html