Last active
December 19, 2015 11:39
-
-
Save joshbeckman/5949332 to your computer and use it in GitHub Desktop.
ColorType in-browser text editor, rainbow-effect
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
data:text/html, | |
<html> | |
<head> | |
<title>ColorType</title> | |
<link href='http://fonts.googleapis.com/css?family=Merriweather' rel='stylesheet' type='text/css'> | |
<style type="text/css"> | |
html { font-family: "Merriweather" } * { -webkit-transition: all linear 1s; } | |
</style> | |
<script> | |
window.onload=function(){ | |
var e=false; | |
var t=0; | |
setInterval(function(){if(!e){t=Math.round(Math.max(0,t-Math.max(t/3,1)))}var n=(255-t*3).toString(16);document.body.style.backgroundColor="#f"+n+"f"+n},1e3);var n=null;document.onkeydown=function(){t=Math.min(128,t+2);e=true;clearTimeout(n);n=setTimeout(function(){e=false},1500)}} | |
</script> | |
</head> | |
<body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just copy the code and paste it into your browser navigation bar. Bookmark it if you like.