blendModes.js 489 B

1234567891011121314151617181920212223242526
  1. const getBlendMode = (function () {
  2. var blendModeEnums = {
  3. 0: 'source-over',
  4. 1: 'multiply',
  5. 2: 'screen',
  6. 3: 'overlay',
  7. 4: 'darken',
  8. 5: 'lighten',
  9. 6: 'color-dodge',
  10. 7: 'color-burn',
  11. 8: 'hard-light',
  12. 9: 'soft-light',
  13. 10: 'difference',
  14. 11: 'exclusion',
  15. 12: 'hue',
  16. 13: 'saturation',
  17. 14: 'color',
  18. 15: 'luminosity',
  19. };
  20. return function (mode) {
  21. return blendModeEnums[mode] || '';
  22. };
  23. }());
  24. export default getBlendMode;