Created
November 5, 2012 17:30
-
-
Save vstoykov/4018629 to your computer and use it in GitHub Desktop.
Simple page that rotate some main colors ('white', 'reg', 'green', 'blue', 'cyan', 'yellow', 'magenta', 'black') to test pixels of the LCD monitor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
html, body { width: 100%; height: 100%; overflow: hidden; padding: 0; margin: 0; border: 0;} | |
.bg-white { background: #FFFFFF; } | |
.bg-red { background: #FF0000; } | |
.bg-green { background: #00FF00; } | |
.bg-blue { background: #0000FF; } | |
.bg-cyan { background: #00FFFF; } | |
.bg-yellow { background: #FFFF00; } | |
.bg-magenta { background: #FF00FF; } | |
.bg-black { background: #000000; } | |
</style> | |
<script type="text/javascript"> | |
var colors = ['white', 'red', 'green', 'blue', 'cyan', 'yellow', 'magenta', 'black'], | |
current_color = 0; | |
function changeColor(body) { | |
current_color += 1; | |
if (current_color > colors.length) current_color = 0; | |
body.className = 'bg-' + colors[current_color]; | |
} | |
</script> | |
</head> | |
<body class="bg-white" onClick="changeColor(this);"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment