[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

html colors

Posted on 2012-09-18
4
Medium Priority
?
477 Views
Last Modified: 2012-09-28
I saw this website:

http://easycalculation.com/rgb-coder.php

Where you can type in an RGB color and it will give you it's equivalent.

So if i type in  0, 0, 255
The website gives me:   #0000FF

This website only let's me input one color at a time.

Does anyone know a website or tool that does the same but will let me input a bunch of rgb colors at a time:

So if I input this:

0, 0, 255
105, 105, 105
255, 255, 255
128, 128, 128


Then it will give me the 4 equivalents hex color codes.

Thanks
0
Comment
Question by:maqskywalker
  • 2
4 Comments
 
LVL 9

Assisted Solution

by:tomcahill
tomcahill earned 400 total points
ID: 38412041
this at least lists the colours so you can see them all:
http://www.javascripter.net/faq/rgbtohex.htm
0
 
LVL 54

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 400 total points
ID: 38412226
0
 
LVL 39

Accepted Solution

by:
BillDL earned 1200 total points
ID: 38428588
Why not just use the "embed" code that they show below the colour converter (http://easycalculation.com/rgb-coder.php) that you found and just paste that several times into the code for a new HTM/HTML page that you can then save locally and open when you want.

You should see the "Code to add this calci to your website  +  - "  below the area that shows the converter.  Click the + sign to show the code and copy it:
<iframe src="http://easycalculation.com/embedded_rgb-coder.php" width="400" height="500" frameborder="0"></iframe>

Open in new window

Personally I would change that to   width="700" height="425"   and then add a   <br />  after the closing </iframe> tag.  That's the code to paste about 6 times in the <body> of a very basic skeleton of a web page like this:
<html>
<head>
<title>RGB To Hex Color Converter</title>
</head>
<body>
<iframe src="http://easycalculation.com/embedded_rgb-coder.php" width="700" height="425" frameborder="0"></iframe><br />
<iframe src="http://easycalculation.com/embedded_rgb-coder.php" width="700" height="425" frameborder="0"></iframe><br />
<iframe src="http://easycalculation.com/embedded_rgb-coder.php" width="700" height="425" frameborder="0"></iframe><br />
<iframe src="http://easycalculation.com/embedded_rgb-coder.php" width="700" height="425" frameborder="0"></iframe><br />
<iframe src="http://easycalculation.com/embedded_rgb-coder.php" width="700" height="425" frameborder="0"></iframe><br />
<iframe src="http://easycalculation.com/embedded_rgb-coder.php" width="700" height="425" frameborder="0"></iframe><br />
</body>
</html>

Open in new window

Paste this into a text editor like Windows Notepad, do a File > Save As > and name it something like   "RGB2Hex.html"

All that does is to fetch the PHP file from their site into as many IFRAMES as you have on the page and each one will (or should) work independently.

Their JavaScript that does the calculations isn't too complicated (although not something I could have worked out from scratch) and can probably be found quite readily in various other places on web.  The PHP code isn't terribly advanced and isn't doing anything particularly fancy other than supplying the layout for the converter.  If you felt so inclined you could probably modify the PHP code to compact the layout a bit more, add a smaller link to the original site as a credit, and then load your own PHP into IFRAMES.  Alternatively just create your own tables and have inline JavaScript.
RGB2Hex.htm
0
 
LVL 39

Expert Comment

by:BillDL
ID: 38446734
Thank you maqskywalker
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …
Suggested Courses
Course of the Month19 days, 12 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question