From 34d99547b4ad518a1d31089871681e30942f2e31 Mon Sep 17 00:00:00 2001 From: Lewy Blue Date: Wed, 9 Nov 2016 01:41:59 +0000 Subject: [PATCH] Added constants / colors to docs (#10061) --- docs/api/constants/Colors.html | 39 ++++++++++++++++++++++++++++++++++ docs/list.js | 1 + 2 files changed, 40 insertions(+) create mode 100644 docs/api/constants/Colors.html diff --git a/docs/api/constants/Colors.html b/docs/api/constants/Colors.html new file mode 100644 index 0000000000..ba4f8cec2b --- /dev/null +++ b/docs/api/constants/Colors.html @@ -0,0 +1,39 @@ + + + + + + + + + + +

Color Constants

+ +
+ 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.

+ + + var black = THREE.ColorKeywords['black']; + + var red = THREE.ColorKeywords['red']; + + var bisque = THREE.ColorKeywords['bisque']; + + + Note that these don't use camelCase so to match, for example, the X11 color + Blanched Almond ( #FFEBCD ) you would use: + + + var blanchedAlmond = THREE.ColorKeywords['blanchedalmond']; + +
+ + 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. + +

Source

+ + [link:https://github.com/mrdoob/three.js/blob/master/src/math/Color.js src/math/Color.js] + + diff --git a/docs/list.js b/docs/list.js index 780d291e96..e9ea55e531 100644 --- a/docs/list.js +++ b/docs/list.js @@ -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" ], -- GitLab