Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Hex to rgb bootstrap"
Bootstrap 3.2.0 Snippet by
NaveenDA
3.2.0
jQuery
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
1.9K
 
1 Fav
Post to Facebook
Tweet this
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <a class="c" href="http://github/dotcodes" tabindex="-1">Dotcodes</a> <div class="container"> <div class="middle"> <input id="hex" type="text" spellcheck="false" placeholder="hex" autocomplete="off"> <label id="copy" for="color" class="glyphicon glyphicon-record"></label> <input type="color" id="color" style="display:none;" onchange="$('#hex').val(this.value); hexTOrgb(); " > <br> <input id="rgb" class="copy" type="text" spellcheck="false" placeholder="rgb" autocomplete="off"> <span id="copy" data-clipboard-target=".copy" class="glyphicon glyphicon-copy"></span> </div> </div>
body{ background:rgb(255,212,84); background-size:cover; } .middle{ width:445px; height:395px; width: 340px; height: 125px; position: absolute; top: 50%; left: 50%; margin: -62.5px -170px; } input{ color:#000 !important; display: block; width: 335px; font-size: 34px; line-height: 44px; background: transparent; border: none; border-bottom: 1px dotted rgba(0, 0, 0, 0.4); padding: 5px 0; border-radius: 0; outline:0; } ::-webkit-input-placeholder { color: #222; } #copy{ font-size:125%; cursor:pointer; float:right; margin-top:-31px; margin-right:12px; } .c { position: absolute; top: 20px; left: 20px; font-size: 18px; font-weight: 700; line-height: 1.2; text-transform: uppercase; letter-spacing: 1px; } a{ color:rgb(0, 0, 0); text-decoration:none; }
$(document).ready(function(){ $("#hex").keyup(function(){ hexTOrgb(); }); }); function hexTOrgb(){ $("body").css("background",$("#hex").val()); var bodyBG = $("body").css("background-color"); $("#rgb").val(bodyBG); }
Related:
See More
Free Template
Vue Now UI Kit
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76