Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> A Tutorial For Html Color Codes
Rating 5 V
Jaskaran
post Jan 16 2007, 01:29 AM
Post #1


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 22
Joined: 13-January 07
Member No.: 19,476



HTML Coloring System - RGB Values

RGB which stands for Red, Green, Blue. Each can have a value from 0 (none of that color) to 255 (fully that color). The format for RGB is - rgb(RED, GREEN, BLUE), just like the name implies. Below is an example of RGB in use.
Red, Green, and Blue Values:
bgcolor="rgb(255,255,255)" White
bgcolor="rgb(255,0,0)" Red
bgcolor="rgb(0,255,0)" Green
bgcolor="rgb(0,0,255)" Blue

HTML Color Code - Breaking the Code
The following table shows how letters are incorporated into the hexadecimal essentially extending the numbers system to 16 values. Hang in there it all makes sense shortly.

A Real Hexadecimal:
bgcolor="#FFFFFF"

The letter "F" is the maximum amount we can send each color and as you may deduce, this color (#FFFFFF) represents the color white. A formula exists to calculate the numeric equivalent of a hexadecimal.

Hexadecimal Formula:
(15 * 16) + (15) = 255

The formula is real simple. Take the first value (F) or 15 multiply it by 16 and add it to the second value, 15. The value 255 is the maximum allowed for any primary color.

Let's try another one.

Example 2:
bgcolor="#CC7005"

CC(RR - Red)
(12 * 16) + (12) = 204
70(GG - Green)
(7 * 16) + (0) = 112
05(BB - Blue)
(0 * 16) + (5) = 5

If you want to be absolutely sure your colors will not change, use paired hex values for color. Examples: "#0011EE", "#44HHFF", or "#117788". These are called True Colors, since they will stay true in hue from browser to browser.

Notice from vizskywalker:
Fixed small typo in the title


This post has been edited by vizskywalker: Jan 16 2007, 03:27 AM
Go to the top of the page
 
+Quote Post
jlhaslip
post Jan 16 2007, 03:15 AM
Post #2


Advanced Member
Group Icon

Group: Members
Posts: 185
Joined: 15-November 05
From: Inland from the Left Coast of Canada
Member No.: 9,627



A small colour table (3k),

and a considerably larger colour grid (86k).

*Edit* -- links should be good now

This post has been edited by jlhaslip: Apr 23 2007, 12:18 AM
Go to the top of the page
 
+Quote Post
closed
post Mar 6 2007, 04:33 PM
Post #3


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 26
Joined: 6-March 07
Member No.: 20,755



I prefer using hex code e.g. #fff which is equal to #ffffff.
it also have an additional points; that you are sure that your color is in the range of 256 web palette. supported by most monitor even in 8 bit color depth/resolution.
Go to the top of the page
 
+Quote Post
.:Brian:.
post Mar 6 2007, 10:16 PM
Post #4


Premium Member
Group Icon

Group: Members
Posts: 219
Joined: 13-February 07
Member No.: 20,371



This is a nice tutorial, thanks for taking the time to write it.

Also jlhaslip, thanks for those links. I really like some of those tables. Athough, usually when i am searching for a color, rather than try and try for it, or look at a table, I go into Paint Shop Pro (just one of the 100s of applications you could use), and i select a custom color, and go from the color selection thing there (just a glorified version of the standard windows custom color selector that shows the hex code in with the other ones, but the standard color selector works as well, and you can use the techniques that Jaskaran provided.
Go to the top of the page
 
+Quote Post
Orca239
post Mar 8 2007, 03:21 AM
Post #5


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 40
Joined: 7-March 07
From: East Coast, USA
Member No.: 20,760



Nice tutorial, I always used hexcode because I could look at a chart and tell which code to put in (although there are charts for those as well). This RGB code is much easier though because you can play with the numbers to get the right shade easier than with the hexadecimal code. I never used it because I didn't know how, lol. I think I'll start trying to use this code instead of the hexadecimal code now because I can play with it to figure out my shade. Plus I use grays and blacks alot so it really makes it easier for those. With gray you just make sure all three are the same number and bingo! there's a shade of gray. Then I can just move the numbers up or down to get whiter or more black. Thanks again for the nice tut!
Go to the top of the page
 
+Quote Post
Aequitas619
post Apr 9 2007, 07:32 PM
Post #6


Advanced Member
Group Icon

Group: Members
Posts: 101
Joined: 14-November 06
Member No.: 17,255



QUOTE(jlhaslip @ Jan 16 2007, 05:15 AM) *



The links dont seem to work!

Nice tutorial. Explains things very well!
Go to the top of the page
 
+Quote Post
Mandi
post Apr 22 2007, 11:43 AM
Post #7


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 34
Joined: 20-April 07
Member No.: 21,559



A good tutorial it explains the colour codes well, but the links you gave the colour table's do not work
Go to the top of the page
 
+Quote Post
jlhaslip
post Apr 23 2007, 12:20 AM
Post #8


Advanced Member
Group Icon

Group: Members
Posts: 185
Joined: 15-November 05
From: Inland from the Left Coast of Canada
Member No.: 9,627



Fixed the links. I restructured the file system at my Hosting account. These links are good now:

A small colour table (3k),

and a considerably larger colour grid (86k).


Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Converting HTML over to XHTML(13)
  2. How To Remove Bad Sectors Or Bad Clusters From HDD(16)
  3. 3ds Max Tutorial #2-creating Reflective Materials(1)
  4. Photoshop Tutorial: Full Grunge Signature(16)
  5. VB.NET: MS-Access Interaction Tutorial (Part I)(18)
  6. Using The Php Mail() Function For Images Or Attachments(3)
  7. Pre Loader Tutorial For Flash(6)
  8. [tutorial] Basics Of C Programming - Part 1(11)
  9. Converting PSD To HTML(9)
  10. [tutorial] Pc-pc Home Networking.(9)
  11. Installing Glut To Dev C++(3)
  12. Wireless: Bypassing Mac Filtering(10)
  13. Codes For Js(5)
  14. How To Make An Test-based Rpg Game!(4)
  15. Safety(9)
  1. Photographing Fireworks(7)
  2. Increase Your Knowledge Of Html Language(11)
  3. Linux Beginners - Tutorial On Editors In Linux.(3)
  4. Gimp Userbar Tutorial(3)
  5. How To: Display A Members/user List.(3)
  6. Web Editor(0)
  7. Common Ftp Server Error Codes(0)
  8. Bulletproof Ftp Server Tutorial(0)
  9. Moving To Fedora 9(1)
  10. Question About Opengl Codes.(0)
  11. Indentation In Html(4)
  12. Joomla Template Kit Extension For Nvu/composer(2)
  13. What You Need Before You Can Create A Text-based Game..(5)


 



- Lo-Fi Version Time is now: 5th September 2008 - 06:44 AM