background preloader

RGB-to-Hex Color Converter

RGB-to-Hex Color Converter
RGB-to-Hex Conversion Question: How do I convert RGB values of a color to a hexadecimal string? 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. RGB/hex codes for named colors supported in most browsers are listed below: See also:

http://www.javascripter.net/faq/rgbtohex.htm

CSS Angles: Just the Edge Your Web Page Needs! With the influx of JavaScript libraries like jQuery and Prototype, a lot of the more basic elements of front-end development have fallen through the cracks. Gone are the days when we would sit down for a couple of hours to find a creative way to solve a CSS problem; now we immediately turn to JavaScript. Not to say that it’s a bad thing – it is what it is in the current state of web development. But sometimes we have to look back on those old techniques to find a new way of achieving a solution. The first place I saw the use of CSS angles was in Eric Meyer’s Slantastic demo.

HERBOS on Packaging of the World Designer: Ana Cecilia Gutiérrez Garralda Creative Director: Rodrigo Quiroz Miranda Project Type: Produced, Commercial Work Client: San Pablo Farmacia Location: Mexico City, Mexico Packaging Contents: Body Splash Aromatherapy Herbos is an herbal products trademark that is sold exclusively in one of the largest drugstore chains in Mexico. On its first product line, Herbos showcases nine different products used in aromatherapy.The primary plant or flower used in the oil of each product was used as a reference for the packaging graphic design, since this is most important trait for the consumers of herbal products.Each product used in aromatherapy has a specific therapeutic purpose and the name of each product was selected depending on the benefits they provide.The box finishes give a special touch to the packaging; the embossing of the typeface, UV varnish on the icon pattern design, and the silver hot stamping on the top section along with the Herbos logo.

15 simple and effective email marketing tips To make sure your emails don’t get flagged as spam – and deleted before they even get to your subscribers – avoid using words such as ‘Free’, ‘£££’, ‘Save’, ‘Discount’, etc., in both the subject line and the content of your email. 2. Maximising Click-Thru Rates Both web pages and emails can contain a lot of text and graphics, and this sometimes makes it harder to get your subscribers to perform a certain task, such as clicking on a link to see your special offers. Numerous research papers tell us that the majority of Internet users respond better to a plain, bold, blue text link – such as this – as opposed to a banner or button. So, if you’re going to include links in your emails, make sure they are bold, blue and underlined.

Quick Tip – Resizing Images Based On Browser Window Size How Is This Useful? In fluid layouts it is easy to format the text to adjust nicely when the window is resized, but the images are not as fluid-friendly. This Quick Tip shows you how to swap between two image sizes based on the current size of the browser, div, or whatever you decide to make the deciding factor. For those looking for a real life example, Last.fm uses this technique on their artist pages. The technique that will be used can be expanded to cause additional changes upon resize as well, beyond simply image swapping (ie captions, navigation).

75 of the Smartest Resources for Web Designers – cmd + T – Medium A lot of these lists just cram everything and anything into the lineup. So, we decided to pick our designers’ brains to bring you the best resources that we are using on a daily basis. Feel free to add other useful resources in the comments below :) Images + Video Coursera.org About the Course This course will teach you how to develop and apply programming skills to creative work. This is an important skill within the development of creative mobile applications, digital music and video games. It will teach technical skills needed to write software that make use of images, audio and graphics, and will concentrate on the application of these skills to creative projects. HTML5 Presentation In March 1936, an unusual confluence of forces occurred in Santa Clara County. A long cold winter delayed the blossoming of the millions of cherry, apricot, peach, and prune plum trees covering hundreds of square miles of the Valley floor. Then, unlike many years, the rains that followed were light and too early to knock the blossoms from their branches. Instead, by the billions, they all burst open at once. Seemingly overnight, the ocean of green that was the Valley turned into a low, soft, dizzyingly perfumed cloud of pink and white.

Customize Your PayPal Screen - Life in the Grid PayPal has pretty much been the standard when it comes to doing any type of e-commerce transaction in a quick and easy format. Simply sign up for an account, set up your bank information, grab a button to put on your site and you’re in business. However, to customize your PayPal screen is not exactly straightforward. I had to do this process the other day for this site, and I was so frustrated with how much time I spent looking around for the settings, that I decided to write this article to help you get it done quicker. In this quick article we’ll run through how to set up your own custom PayPal logo to give your PayPal transaction screen a more customized look and feel. Overview

10 Essential Features of Every Good Business Website So your business has a website — or you're in need of one for your brand new venture. Web design can be an overwhelming process, so we've spoken to a few web designers who told us what you need to have on your site ... and what you can probably do without (like crazy Flash animation). The first thing you must do is secure a good, catchy URL. BitTorrent Turns Web Browsers Into a File-Sharing Hub BitTorrent Inc., the people behind the popular BitTorrent client uTorrent, have just unveiled a new project that turns web browsers into fully fledged file-sharing hubs. "Torque" uses the new Btapp.js library and enables developers to code a wide variety of browser-based file-sharing apps. To show what it's capable of, BitTorrent released a torrent client for Chrome and a browser-based file-sharing app. Downloading torrents in a web-browser is nothing new. Opera integrated BitTorrent support half a decade ago, and for other browsers there are plugins and web-based tools available.

Get Colors from Image With the magic of HTML5 you can get colors from any image with this simple online tool. To use this new color tool it's recomended that you upgrade your web browser to the latest version.(For the full HTML5 support). 7 Mistakes to Avoid on Your Ecommerce Site We've all been there. You're all set to buy something, credit card in hand, but for one reason or another you never close the deal. Maybe the third time you were asked to enter your credit card number you gave in. Perhaps it was the exorbitant shipping costs. Maybe the site crashed. The truth is, there are at least seven things that send potential customers fleeing in horror from your website, some of which were chronicled in this perceptive comic from The Oatmeal.

Attack This category is for tagging common types of application security attacks. What is an attack? Attacks are the techniques that attackers use to exploit the vulnerabilities in applications.

Related: