Colors.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>Color Constants</h1>
  12. <div>
  13. 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
  14. can easily match Three colors with CSS named colors. <br /><br />
  15. <code>
  16. var black = THREE.ColorKeywords['black'];
  17. var red = THREE.ColorKeywords['red'];
  18. var bisque = THREE.ColorKeywords['bisque'];
  19. </code>
  20. Note that these don't use camelCase so to match, for example, the X11 color
  21. Blanched Almond ( #FFEBCD ) you would use:
  22. <code>
  23. var blanchedAlmond = THREE.ColorKeywords['blanchedalmond'];
  24. </code>
  25. </div>
  26. 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.
  27. <h2>Source</h2>
  28. [link:https://github.com/mrdoob/three.js/blob/master/src/math/Color.js src/math/Color.js]
  29. </body>
  30. </html>