विश्व का सबसे बड़ा हिंदी वेब डेवलपर साइट
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Colors NCol


NCol Calculator


 
rgb(255, 0, 0)
#ff0000
hsl(0, 100%, 50%)


H:
W:
B:

Natural Colors (NCol)

Natural colors (NCol) is an initiative from W3Schools.

The system is designed to make it easier to select HTML colors.

NCol specifies colors using a color letter with a number to specify the distance (in percent) from the color.

R30 means 30% away from Red , moving towards Yellow. (In other words: Red with 30% Yellow)

LetterColorHues
RRed
R
R25
R50
R75
YYellow
Y
Y25
Y50
Y75
GGreen
G
G25
G50
G75
CCyan
C
C25
C50
C75
BBlue
B
B25
B50
B75
MMagenta
M
M25
M50
M75
R Y G C B M
                                                                                                                       

Color and distance can also be given in hues (0-360):

R = 000 Y = 060 G = 120 C = 180 B = 240 M = 300

HTML Support

NCol is not supported in HTML (yet), but it is very close to the new HWB color system suggested in CSS4.

While waiting for CSS4, you can include W3Schools' Color library, and use NCol as an HTML attribute like this:

Example

<div data-w3-color="R50,50%,0">

<p>London is the capital city of England.
It is the most populous city in the United Kingdom,
with a metropolitan area of over 13 million inhabitants.</p>

</div>

<script src="http://www.w3schools.com/lib/w3colors.js"></script>
Try It Yourself »

W3Schools Color Library

The JavaScript library used in the example above can be downloaded from

http://www.w3schools.com/lib/w3colors.js


Why NCol?

Trying to explain colors using RGB or HEX notation is very difficult.

Can you tell what color rgb(199,21,133) is?

RGB is based on how to physically produce colors by mixing light sources.

NCol is based on what colors look like to the human eye.

Because of this, NCol makes it much easier to describe colors.

Natural colors were first described by Karl Ewald Konstantin Hering (Germany 1834 - 1918).