No credit card. Takes under a minute.

Login
INSIGHTS2 MIN READ

Codes to define Colours

giludi

Published on September 21, 2014

Published on Wealthy Affiliate — a platform for building real online businesses with modern training and AI.

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)

Ready to put this into action?

Start your free journey today — no credit card required.

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

Share this insight

This conversation is happening inside the community.

Join free to continue it.

The Internet Changed. Now It Is Time to Build Differently.

If this article resonated, the next step is learning how to apply it. Inside Wealthy Affiliate, we break this down into practical steps you can use to build a real online business.

No credit card. Instant access.

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.

Member Login

© 2005-2026 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.