提交 34d99547 编写于 作者: L Lewy Blue 提交者: Mr.doob

Added constants / colors to docs (#10061)

上级 da3e0e89
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>Color Constants</h1>
<div>
These match the standard [link:https://en.wikipedia.org/wiki/X11_color_names X11 Named Colors], supported by most modern browsers. This means that you
can easily match Three colors with CSS named colors. <br /><br />
<code>
var black = THREE.ColorKeywords['black'];
var red = THREE.ColorKeywords['red'];
var bisque = THREE.ColorKeywords['bisque'];
</code>
Note that these don't use camelCase so to match, for example, the X11 color
Blanched Almond ( #FFEBCD ) you would use:
<code>
var blanchedAlmond = THREE.ColorKeywords['blanchedalmond'];
</code>
</div>
See the [link:https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart X11 Color Chart] for the full list of supported named colors.
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/math/Color.js src/math/Color.js]
</body>
</html>
......@@ -18,6 +18,7 @@ var list = {
"Constants": [
[ "Animation", "api/constants/Animation" ],
[ "Colors", "api/constants/Colors" ],
[ "CustomBlendingEquation", "api/constants/CustomBlendingEquations" ],
[ "DrawModes", "api/constants/DrawModes" ],
[ "Materials", "api/constants/Materials" ],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册