Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
Script de Photoshop: configure textColor.rgb.hexValue para que sea igual a un nombre de archivo

Ok, aquí está la cosa: hay muchos archivos .psd, cada archivo tiene 1 capa de texto dentro, además, cada archivo lleva el nombre de un código de color hexadecimal (ejemplo: #111111.psd). Tengo un código que puede cambiar el color de fuente de varias capas en varios archivos, PERO, solo puedo especificar 1 color hexadecimal en ese código.

Aquí está el código (no es mío, lo encontré en las discusiones de Adobe):

La cosa es configurar textColor.rgb.hexValue para que sea igual al nombre de archivo de un archivo .psd (como resultado, necesito que el texto esté coloreado con el color en el nombre del archivo)

 var textColor = new SolidColor(); textColor.rgb.hexValue = "57a878" function colorTextLayer(layerCol) { var layerCount = layerCol.length; for (var j = layerCount - 1; j >= 0; j--) { var l = layerCol[j] if(l.typename == "LayerSet") colorTextLayer(layerCol[j].layers) else { if (l.kind == LayerKind.TEXT) l.textItem.color = textColor; } } } var selectFolder = Folder.selectDialog( "Please select folder of PSDs"); var files = selectFolder.getFiles("*.psd"); //get an array of all PSDs in the folder var fileList = selectFolder.getFiles("*.psd"); //iterate through file list for (var i = 0; i < files.length; i++) { var doc = app.open(files[i]); colorTextLayer(doc.layers) doc.close(SaveOptions.SAVECHANGES) }

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!