diff --git a/index.html b/index.html index a4bc7a6..552ec59 100644 --- a/index.html +++ b/index.html @@ -69,6 +69,7 @@
Help
+
Color Blind
Tweet diff --git a/js/input.js b/js/input.js index 3ca5f59..bd230c0 100644 --- a/js/input.js +++ b/js/input.js @@ -72,6 +72,31 @@ function addKeyListeners() { pause(); return false; }); + + $("#colorBlindBtn").on('touchstart mousedown', function() { + window.colors = ["#8e44ad", "#f1c40f", "#3498db", "#d35400"]; + + window.hexColorsToTintedColors = { + "#8e44ad": "rgb(229,152,102)", + "#f1c40f": "rgb(246,223,133)", + "#3498db": "rgb(151,201,235)", + "#d35400": "rgb(210,180,222)" + }; + + window.rgbToHex = { + "rgb(142,68,173)": "#8e44ad", + "rgb(241,196,15)": "#f1c40f", + "rgb(52,152,219)": "#3498db", + "rgb(211,84,0)": "#d35400" + }; + + window.rgbColorsToTintedColors = { + "rgb(142,68,173)": "rgb(229,152,102)", + "rgb(241,196,15)": "rgb(246,223,133)", + "rgb(52,152,219)": "rgb(151,201,235)", + "rgb(46,204,113)": "rgb(210,180,222)" + }; + }); if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { diff --git a/style/style.css b/style/style.css index ecd1e5d..7888f1a 100644 --- a/style/style.css +++ b/style/style.css @@ -123,6 +123,18 @@ button:focus { background-color:rgba(236,240,241,.7); } +#colorBlindBtn { + position:absolute; + width:120px; + height:20px; + z-index:9999; + left: 47%; + top:65%; + font-size:15px; + text-align:center; + color:#232323; + cursor:pointer; +} .instructions_body { margin-left:3px; width:calc(100% - 12px) ! important;