Codes to define Colours

10
6
1.3K followers

When I published today my post "Random Colour - colour palette for your website", a member asked me what hex codes are. This was the starting point for this blog about coding of colours.

As you probably know the colours of a computer screen are RGB colours: R= Red, G=Green and B=blue. RGB is an additive colour model in which the red, green and blue light are added together to give use a broad array of colours. Each of the three basic colours has a range of 256 shades (0-255), so that we can have a total of 256 x 256 x 256 = 16,777,216 possible colours.

In HTML and CSS coding you can define a colour in different manners:

17 colours by their names in HTML and 140 colours in CSS.

The 17 standard colours are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow.

All the colours can be defined RGB values:

Black = 0,0,0 (R0,G0,B0)

White = 255, 255, 255 (R255,G255;B255)

Red = 255,0,0

Green = 0,255,0

Blue = 0,0,255 and so on

You can also define the colours in the hexadecimal, also base 16, or hex codes: 16 being the square root of 256. The 16 normally used signs are the numbers from 0 to 9 and the six first letters from the ABC (A, B, C, D, E, F) representing the numbers from ten to fifteen. Today the hexadecimal colour code is the most used in webdesign.

To explain the simplest way is to compare the 17 standard colours by name, by rgb values and by hex values

Aqua 0,255,255 #00FFFF (Cyan)

Black 0,0,0 #000000

Blue 0,0,255 #0000FF

Fuchsia 255,0,255 #FF00FF (Magenta)

Gray 128,128,128 #808080

Green 0,128,0 #008000

Lime 0,255,0 #00FF00 (RGB green)

Maroon 128,00,00 #800000

Navy 0,0,128 #0000FF

Olive 128,128,0 #808000

Orange 255,165,0 #FFA500

Purple 128,0,128 #800080

Red 255,0,0 #FF0000

Silver 192,192,192 #C0C0C0

Teal 128,128,0 #008080

White 255,255,255 #FFFFFF

Yellow 255,255,0 #FFFF00

There are a lot of colour picker tools and information about how to define and find colours.

These are my favourites:

http://www.w3schools.com/html/html_colorvalues.asp

http://www.w3schools.com/tags/ref_colorpicker.asp

http://www.rgbtohex.net/

http://hex.colorrrs.com/

www.colorpicker.com

http://web.forret.com/tools/color.asp

10
6

Join FREE & Launch Your Business!

Exclusive Bonus - Offer Ends at Midnight Today

00

Hours

:

00

Minutes

:

00

Seconds

2,000 AI Credits Worth $10 USD

Build a Logo + Website That Attracts Customers

400 Credits

Discover Hot Niches with AI Market Research

100 Credits

Create SEO Content That Ranks & Converts

800 Credits

Find Affiliate Offers Up to $500/Sale

10 Credits

Access a Community of 2.9M+ Members

By continuing, you agree to our Terms of Service and Privacy Policy
No credit card required

Recent Comments

6

Impressive coming from a guy......most men know red, blue, green, yellow, black and brown. You actually know the words teal and magenta and lime, etc. ~Debbi

1

Thanks for the detail Explanation of Hexadecimal , RGB code. It is a great helpful blog for WAyers.

Thank you Giludi.
A while ago, I designed some t-shirts on an online t-shirt design site. Wanting to also replicate my designs on other t-shirt design sites, I took a note of the hex codes, not really knowing what they were, but guessing that they must be important. I now know why!
Many thanks,
All the best,
Brandon

Put a bookmark on it, thank you Gilugi, Loes

VERY HELPFUL! Thanks so much Giludi!

Thanks, Guy! Now I know what you were talking about. I've seen those numbers with reference to colors, but never knew what they were.

Join FREE & Launch Your Business!

Exclusive Bonus - Offer Ends at Midnight Today

00

Hours

:

00

Minutes

:

00

Seconds

2,000 AI Credits Worth $10 USD

Build a Logo + Website That Attracts Customers

400 Credits

Discover Hot Niches with AI Market Research

100 Credits

Create SEO Content That Ranks & Converts

800 Credits

Find Affiliate Offers Up to $500/Sale

10 Credits

Access a Community of 2.9M+ Members

By continuing, you agree to our Terms of Service and Privacy Policy
No credit card required

2.9M+

Members

190+

Countries Served

20+

Years Online

50K+

Success Stories

The world's most successful affiliate marketing training platform. Join 2.9M+ entrepreneurs building their online business with expert training, tools, and support.

© 2005-2025 Wealthy Affiliate
All rights reserved worldwide.

🔒 Trusted by Millions Worldwide

Since 2005, Wealthy Affiliate has been the go-to platform for entrepreneurs looking to build successful online businesses. With industry-leading security, 99.9% uptime, and a proven track record of success, you're in safe hands.