0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00
penpot-exporter-figma-plugin/plugin-src/translators/translateBlendMode.ts

47 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

2024-04-15 07:03:30 -05:00
import { BlendMode as PenpotBlendMode } from '@ui/lib/types/utils/blendModes';
export const translateBlendMode = (blendMode: BlendMode): PenpotBlendMode => {
switch (blendMode) {
2024-04-15 10:35:26 -05:00
//@TODO: is not translatable in penpot, this is the closest one
2024-04-15 07:03:30 -05:00
case 'PASS_THROUGH':
case 'NORMAL':
return 'normal';
2024-04-15 10:35:26 -05:00
//@TODO: is not translatable in penpot, this is the closest one
case 'LINEAR_BURN':
2024-04-15 07:03:30 -05:00
case 'DARKEN':
return 'darken';
case 'MULTIPLY':
return 'multiply';
case 'COLOR_BURN':
return 'color-burn';
case 'LIGHTEN':
return 'lighten';
case 'SCREEN':
return 'screen';
2024-04-15 10:35:26 -05:00
//@TODO: is not translatable in penpot, this is the closest one
case 'LINEAR_DODGE':
2024-04-15 07:03:30 -05:00
case 'COLOR_DODGE':
return 'color-dodge';
case 'OVERLAY':
return 'overlay';
case 'SOFT_LIGHT':
return 'soft-light';
case 'HARD_LIGHT':
return 'hard-light';
case 'DIFFERENCE':
return 'difference';
case 'EXCLUSION':
return 'exclusion';
case 'HUE':
return 'hue';
case 'SATURATION':
return 'saturation';
case 'COLOR':
return 'color';
case 'LUMINOSITY':
return 'luminosity';
default:
return 'normal';
}
};