Source: commonjs-modules.js

  1. /**
  2. * Color mixer.
  3. * @module color/mixer
  4. */
  5. module.exports = {
  6. /**
  7. * Blend two colors together.
  8. * @param {string} color1 - The first color, in hexadecimal format.
  9. * @param {string} color2 - The second color, in hexadecimal format.
  10. * @return {string} The blended color.
  11. */
  12. blend: function(color1, color2) {
  13. // ...
  14. }
  15. };
  16. /**
  17. * Darken a color by the given percentage.
  18. * @param {string} color - The color, in hexadecimal format.
  19. * @param {number} percent - The percentage, ranging from 0 to 100.
  20. * @return {string} The darkened color.
  21. */
  22. module.exports.darken = function(color, percent) {
  23. // ..
  24. };
THIS IS A DEMO: All content was generated with examples taken from the JSDoc page.