Menu
×
   ❮     
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
     ❯   

颜色 CMYK


CMYK 是 CSS4 建议的标准。


CMYK 计算器


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


青色 (C)
品红 (M)
黄 (Y)
黑 (K)

CMYK 颜色

CMYK 颜色是青色、品红、黄和黑色组合而成。

计算机屏幕使用 RGB 颜色值显示颜色。打印机通常使用 CMYK 颜色值呈现颜色。


HTML 支持

HTML 不支持 CMYK,但它在 CSS4 中被建议作为一种新的标准。

在等待 CSS4 的同时,您可以包含 W3Schools 的颜色库,并像这样使用 CMYK 作为 HTML 属性



亲自尝试

示例

<div data-w3-color="cmyk(100%, 0%, 0%, 0%)">

<p>伦敦是英格兰的首都。
它是英国人口最多的城市,
拥有超过 1300 万人口的大都市区。</p>

</div>

<script src="/lib/w3color.js"></script>
亲自尝试 »

W3Schools 颜色库

上面示例中使用的 JavaScript 库可以从以下地址下载

https://w3schools.org.cn/lib/w3color.js


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.