HTML Screen colorDepth প্রপার্টি ইমেজ প্রদর্শনের জন্য কালার প্যালেটের বিট ডেপথ রিটার্ন করে (বিটস পার পিক্সেল)।
সিনট্যাক্স
নিচে সিনট্যাক্স দেওয়া হলো:
screen.colorDepth
উদাহরণ
HTML Screen colorDepth প্রপার্টির একটি উদাহরণ দেখা যাক:
<!DOCTYPE html> <html> <style> body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; } .btn { background: #db133a; border: none; height: 2rem; border-radius: 2px; width: 40%; display: block; color: #fff; outline: none; cursor: pointer; margin: 1rem auto; } .show { font-size: 1.2rem; margin: 1rem auto; font-weight: bold; font-family: sans-serif; } </style> <body> <h1>HTML screen colorDepth প্রপার্টি</h1> <button class="btn" onclick="get()">কলার ডেপথ দেখান</button> <div class="show"></div> <script> function get() { document.querySelector(".show").innerHTML = "কলার ডেপথ " + screen.colorDepth + " bits per pixel"; } </script> </body> </html>আউটপুট

কলার ডেপথ দেখান বাটনে ক্লিক করুন স্ক্রিনের কালার ডেপথ প্রদর্শন করার জন্য।
