জাভাস্ক্রিপ্টে screen.colorDepth প্রপার্টি ব্যবহার করে উইন্ডো স্ক্রিনে এক রঙ প্রদর্শনের জন্য ব্যবহৃত বিটের সংখ্যা পাওয়া যায়।
উদাহরণ
<!DOCTYPE html> <html> <body> <script> document.write("Screen width: " + screen.width); document.write("<br>Screen height: " + screen.height); document.write("<br>Color Depth: " + screen.colorDepth); </script> </body> </html>