Welcome Guest ( Log In | Register )




                Web Hosting

 
Reply to this topicNew 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.

[note=vizskywalker]Fixed small typo in the title[/note]

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: 190
Joined: 15-November 05
From: Inland from the Left Coast of Canada
Member No.: 9,627
myCENTs:91.54


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) [snapback]96035[/snapback]



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: 190
Joined: 15-November 05
From: Inland from the Left Coast of Canada
Member No.: 9,627
myCENTs:91.54


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 topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   5 Feelay 39 7th January 2009 - 05:29 PM
Last post by: khalilov
No New Posts 5 Kid Saiyan 1,864 3rd January 2009 - 07:11 AM
Last post by: iG-curtis
No New Posts   10 dhanesh 3,122 2nd January 2009 - 09:27 PM
Last post by: iG-SATYAM
No New Posts   3 shwaggy 1,109 28th December 2008 - 10:38 AM
Last post by: TavoxPeru
No New Posts 2 Niru 112 28th December 2008 - 03:45 AM
Last post by: turbopowerdmaxsteel
No New Posts   3 dhanesh 1,202 24th December 2008 - 01:28 AM
Last post by: laniczech
No New Posts   5 tansqrx 1,007 20th December 2008 - 09:37 PM
Last post by: iG-Razzvy
No New Posts 11 Propeng 1,382 17th December 2008 - 10:40 PM
Last post by: yordan
No New Posts   4 Aditya 1,941 17th December 2008 - 04:03 PM
Last post by: ryantommo
No New Posts 13 Habble 3,416 17th December 2008 - 04:02 PM
Last post by: ryantommo
No New Posts   17 l337 Nurse Pedestrian 9,026 12th December 2008 - 02:52 AM
Last post by: iG-biswarup ghosh
No New Posts 7 Snake 776 5th December 2008 - 10:30 AM
Last post by: wutske
No New Posts   12 dhanesh 2,320 25th November 2008 - 12:49 PM
Last post by: iG-farah
No New Posts 3 Compuccino 3,233 25th November 2008 - 04:17 AM
Last post by: iG-anonymous dude
No New Posts   7 mzwebfreak 3,728 24th November 2008 - 10:52 PM
Last post by: iG-Rachael