PS2025:用脚本自动生成莫兰迪色系女生专属简历模板
以下是一个适用于 Photoshop 2025 版本的 JavaScript 脚本示例,用于自动生成适合女生的简历模板,采用莫兰迪色系。莫兰迪色系以其柔和、低饱和度的色彩而闻名,非常适合用于简历设计。 ```javascript #target photoshop // 定义莫兰迪色系 var morandiColors = [ [173, 168, 167], // 灰粉色 [152, 145, 140], // 灰紫色 [130, 120, 110], // 灰蓝色 [110, 100, 90], // 灰绿色 [90, 80, 70] // 灰棕色 ]; // 创建新文档 var doc = app.documents.add(800, 1200, 300, "Resume Template"); // 设置颜色 var backgroundLayer = doc.artLayers.add(); backgroundLayer.kind = LayerKind.SOLIDFILL; var fillColor = new SolidColor(); fillColor.rgb.red = morandiColors[0][0]; fillColor.rgb.green = morandiColors[0][1]; fillColor.rgb.blue = morandiColors[0][2]; backgroundLayer.fillOpacity = 100; backgroundLayer.name = "Background"; // 添加 var titleLayer = doc.artLayers.add(); titleLayer.kind = LayerKind.TEXT; var titleText = titleLayer.textItem; titleText.contents = "Resume"; titleText.position = Array(100, 100); titleText.size = 48; titleText.color = new SolidColor(); titleText.color.rgb.red = morandiColors[1][0]; titleText.color.rgb.green = morandiColors[1][1]; titleText.color.rgb.blue = morandiColors[1][2]; // 添加个人信息 var infoLayer = doc.artLayers.add(); infoLayer.kind = LayerKind.TEXT; var infoText = infoLayer.textItem; infoText.contents = "Name: Jane Doe\nEmail: jane.doe@example.com\nPhone: 123-456-7890"; infoText.position = Array(100, 200); infoText.size = 24; infoText.color = new SolidColor(); infoText.color.rgb.red = morandiColors[2][0]; infoText.color.rgb.green = morandiColors[2][1]; infoText.color.rgb.blue = morandiColors[2][2]; // 添加工作经历 var experienceLayer = doc.artLayers.add(); experienceLayer.kind = LayerKind.TEXT; var experienceText = experienceLayer.textItem; experienceText.contents = "Work Experience:\n- Company A, Position, 2020-2022\n- Company B, Position, 2018-2020"; experienceText.position = Array(100, 300); experienceText.size = 24; experienceText.color = new SolidColor(); experienceText.color.rgb.red = morandiColors[3][0]; experienceText.color.rgb.green = morandiColors[3][1]; experienceText.color.rgb.blue = morandiColors[3][2]; // 添加教育 var educationLayer = doc.artLayers.add(); educationLayer.kind = LayerKind.TEXT; var educationText = educationLayer.textItem; educationText.contents = "Education:\n- University, Degree, 2014-2018"; educationText.position = Array(100, 400); educationText.size = 24; educationText.color = new SolidColor(); educationText.color.rgb.red = morandiColors[4][0]; educationText.color.rgb.green = morandiColors[4][1]; educationText.color.rgb.blue = morandiColors[4][2]; // 保存文档 var saveFile = new File("~/Desktop/Resume_Template.psd"); doc.saveAs(saveFile); alert("Resume template created successfully!"); ``` 代码说明: 1. 颜色定义:莫兰迪色系的颜色被定义为一个数组,每个颜色由 RGB 值组成。 2. 文档创建:创建一个新的 Photoshop 文档,尺寸为 800x1200 像素,分辨率为 300 DPI。 3. 设置:设置颜色为莫兰迪色系中的第一个颜色。 4. 文本添加:添加、个人信息、工作经历和教育的文本层,并使用莫兰迪色系中的不同颜色进行区分。 5. 保存文档:将生成的简历模板保存为 PSD 文件到桌面。 额外需要注意的逻辑点: 1. 颜色选择:确保莫兰迪色系的颜色搭配和谐,避免颜色过于接近导致视觉疲劳。 2. 文本布局:合理布局文本内容,确保简历的可读性和美观性。 3. 扩展性:可以根据需要扩展脚本,添加更多模块或自定义内容。 ######[AI写代码神器 | 1050点数解答 | 2025-03-01 23:12:42]
- 代码填空挑战:完成正态分布、随机数生成及数据处理代码(阿里通义 | 506点数解答 | 2025-03-23 14:32:14)341
- 挑战!完成代码填空解锁数据处理奥秘(字节豆包 | 116点数解答 | 2025-03-26 22:22:15)356
- 挑战填空!完成这段 NumPy 代码实现数据生成与保存(DeepSeek | 178点数解答 | 2025-03-26 22:26:30)418
- PS2025脚本助力:老旧照片修复上色秒回拍摄原貌!(DeepSeek | 532点数解答 | 2025-02-20 20:44:57)180
- Spring项目:实现UserMapper接口及XML映射文件,查询所有用户信息(GPT | 445点数解答 | 2024-09-12 14:40:40)208
- 解决 consoleapplication40.cpp 中 buildtree 模板参数推导失败错误的方法(字节豆包 | 138点数解答 | 2024-11-10 23:42:06)248
- 二手车交易价格预测赛题:思路剖析与程序实现全步骤揭秘(讯飞星火 | 1207点数解答 | 2024-11-17 18:48:26)379
- 揭秘!40 万条数据二手车交易价格预测赛题思路与程序实现全步骤(字节豆包 | 557点数解答 | 2024-11-17 18:50:01)273
- 二手车交易价格预测赛题:从数据处理到模型调优全流程揭秘(阿里通义 | 1736点数解答 | 2024-11-17 18:50:36)298
- Android 课程作业考试管理 APP 开发:全功能实现与上线优化之路(GPT | 84点数解答 | 2024-12-14 13:46:35)287
- Android 学生学习管理 APP:功能完备开发全攻略(字节豆包 | 30点数解答 | 2024-12-14 13:47:04)246
- 5条新春贺语,开启龙年吉祥团圆新篇章!(字节豆包 | 135点数解答 | 2025-01-15 14:43:34)329