C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
colorDepth property in JavaScript
WhatsApp
Mahak Gupta
5y
3.9
k
0
1
25
Blog
colorDepth property in JavaScript
colorDepth property in Javascript is used to return the bit depth of the color palette, which is used for displaying images.
Ex:
<html>
<body>
<script type=
"text/javascript"
>
if
(screen.colorDepth <= 8)
document.body.style.background =
"Red"
else
document.body.style.background =
"Green"
</script>
</body>
</html>
People also reading
Membership not found