background preloader

Tools

Facebook Twitter

The first commented line is your dabblet’s title ✿ dabblet.com. RGB-to-Hex Color Converter. RGB-to-Hex Conversion Question: How do I convert RGB values of a color to a hexadecimal string?

RGB-to-Hex Color Converter

Answer: The RGB-to-hexadecimal converter algorithm is simple: make sure that your values are in the range 0...255, convert R, G, B to hex strings, and then concatenate the three hex strings together. Convert RGB to Hex color values here: function rgbToHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B)} function toHex(n) { n = parseInt(n,10); if (isNaN(n)) return "00"; n = Math.max(0,Math.min(n,255)); return "0123456789ABCDEF".charAt((n-n%16)/16) + "0123456789ABCDEF".charAt(n%16); } Notes: The script parses the input R, G, B values as integers using the standard function parseInt(string,10); the second, optional argument 10 specifies that the value must be parsed as a decimal number.

Sizzle JavaScript Selector Library. Drag and drop font testing. Transforms. CSS3 Please! The Cross-Browser CSS3 Rule Generator. Selectors Test, CSS3 .info. Home / About Us After starting the test-suite it will automatically run a large number of small tests which will determine if your browser is compatible with a large number of CSS selectors.

Selectors Test, CSS3 .info

If it is not compatible with a particular selector it is marked as such. CSS3 Gradient Generator. HTML5 & CSS3 Support, Web Design Tools & Support - FindMeByIP - CSS3 & HTML5 Browser Support.

Modernizr. CSS3 Generator. Button Maker. CSS Border Radius Generator. Cascader - Cleaning Up The Web. Css3 drop shadow generator. CSS3 PIE: CSS3 decorations for IE.