選單
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

Colors NCol


NCol 計算器


 
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)

Letter顏色Hues
R紅色
R
R25
R50
R75
Y黃色
Y
Y25
Y50
Y75
G綠色
G
G25
G50
G75
C青色
C
C25
C50
C75
B藍色
B
B25
B50
B75
M洋紅色
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 支援

NCol is not supported in HTML, 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

示例

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

<p>倫敦是英格蘭的首都。
它是英國人口最多的城市,
都市區有超過 1300 萬居民。</p>

</div>

<script src="/lib/w3color.js"></script>
自己試試 »

W3Schools 顏色庫

上述示例中使用的 JavaScript 庫可以從以下網址下載

https://w3schools.tw/lib/w3color.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).


×

聯絡銷售

如果您想將 W3Schools 服務用於教育機構、團隊或企業,請傳送電子郵件給我們
sales@w3schools.com

報告錯誤

如果您想報告錯誤,或想提出建議,請傳送電子郵件給我們
help@w3schools.com

W3Schools 經過最佳化,旨在方便學習和培訓。示例可能經過簡化,以提高閱讀和學習體驗。教程、參考資料和示例會不斷審查,以避免錯誤,但我們無法保證所有內容的完全正確性。使用 W3Schools 即表示您已閱讀並接受我們的使用條款Cookie 和隱私政策

版權所有 1999-2024 Refsnes Data。保留所有權利。W3Schools 由 W3.CSS 提供支援