स्क्रीन की पिक्सेल गहराई वापस करने के लिए, screen.pixelDepth . का उपयोग करें जावास्क्रिप्ट में संपत्ति।
उदाहरण
जावास्क्रिप्ट में पिक्सेल गहराई प्राप्त करने के लिए आप निम्न कोड चलाने का प्रयास कर सकते हैं।
<!DOCTYPE html>
<html>
<body>
<script>
document.write("Screen width: " + screen.width);
document.write("<br>Screen height: " + screen.height);
document.write("<br>Pixel Depth: " + screen.pixelDepth);
</script>
</body>
</html>