Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

I have a list of colors as RRR GGG BBB in a text file and I need to use only those colors to create my images. I'd like to be able to load those colors to Photoshop's color palette (swatch). Is there a way to automate swatch creation process from within Photoshop or some other way to create swatch file from a list of colors as a text file?

(P.S. there should be tags such as Palette and Swatch)

Upd: I have lots of colors in the list and my list is not the only one, users are supposed to have easy way to convert the list into Photoshop compatible swatch file so we can all start drawing right away.

share|improve this question
add comment

migrated from photo.stackexchange.com Oct 1 '12 at 11:12

This question came from our site for professional, enthusiast and amateur photographers.

3 Answers

up vote 2 down vote accepted

ASE is Adobe Swatch Exchange Format. Unfortunately, it is a binary format, but fortunately, people have made source code available for ASE encoding scripts. See for instance ( http://blog.soulwire.co.uk/code/actionscript-3/as3-ase-adobe-swatch-exchange-encoder ).

Adobe may support ACBL format (XML) or ACF format (text), but they appear to be legacy formats and do not show up in the "load swatches" file types options.

This doesn't always mean they aren't supported, but you will need to get your file dialog to ignore the file-type filter:

windows, type *.* in the file name box and hit enter

share|improve this answer
    
Can you please link to any examples of ACF or ACBL files? –  user1306322 Oct 2 '12 at 18:47
    
    
Thanks a lot! It will take some time to make public version though. –  user1306322 Oct 2 '12 at 19:57
add comment

I'd create a small web page and then take a screen grab. You'll end up with a bitmap image you can place on a layer. From there you can sample the colours and use them in your design.

If your list looks something like this:

0 0 0
0 0 255
0 255 0
255 0 0

Some clever find/replacing should get you what's needed to create a web page. Depending on the exact characters in the document, you should hopefully be able to get the document into this format. Finding spaces and replacing with ", " should give you this:

0, 0, 0
0, 0, 255
0, 255, 0
255, 0, 0

You could then find the return character, and replace with something like this:

);">&nbsp;</div> *return character*
<div style="width:100px;height:100px;float:left;background:rgb(

So you end up with:

0, 0, 0);">&nbsp;</div>
<div style="width:100px;height:100px;float:left;background:rgb(0, 0, 255);">&nbsp;</div>
<div style="width:100px;height:100px;float:left;background:rgb(0, 255, 0);">&nbsp;</div>
<div style="width:100px;height:100px;float:left;background:rgb(255, 0, 0)

Which means you just need to add a little bit of HTML to the start and end of the document to have a webpage you can display and screen grab.

<!DOCTYPE html>
<html lang="en-us">
<body>
<div style="width:100px;height:100px;float:left;background:rgb(0, 0, 0);">&nbsp;</div>
<div style="width:100px;height:100px;float:left;background:rgb(0, 0, 255);">&nbsp;</div>
<div style="width:100px;height:100px;float:left;background:rgb(0, 255, 0);">&nbsp;</div>
<div style="width:100px;height:100px;float:left;background:rgb(255, 0, 0);">&nbsp;</div>
</body>
</html>

Make sure the browser you use displays the colours in a way that matches your raw colour values though. You can test this by checking a few of the colours — see if they match the values you initially entered.

You could even save the find and replace strings and process future files in the same way.

If you really need the result to be a Photoshop swatch file, you might need to enlist a friendly developer to create a small script to build the files you're after.


Another option is scripting Photoshop to automate adding the swatches directly, rather than building a swatch file. The PS-Scripts forum might be a good place to look for help.

http://www.ps-scripts.com/bb/viewtopic.php?t=842

share|improve this answer
    
>If you really need the result to be a Photoshop swatch file, you might need to enlist a friendly developer to create a small script to build the files you're after. — That's what I'm asking for, is there an app for that or at least some tutorial on making your own swatch files? Parsing RGB into a web page, using a browser, making a screenshot, and I didn't find in your answer how to make a swatch file out of that. Seems like a lot of unnecessary steps to make a swatch file out of RGB values! –  user1306322 Oct 2 '12 at 10:20
    
The idea is to have a bitmap swatch. You can take samples straight from the bitmap itself, without needing a swatch file. –  Marc Edwards Oct 2 '12 at 11:37
    
Just added another option above... you could create a script to add the swatches directly to Photoshop. –  Marc Edwards Oct 2 '12 at 11:52
add comment

You may not have the Color panel open by default, so click Window -> Color (or F6) the color panel will open and you should see 3 RGB sliders, or 4 CYMK sliders depending on your colour mode.

Next to the sliders (left) are 2 squares, click on one of them and you get the "Color Picker" window.

Now simply enter the RGB numbers, and click "Add to Swatches" (it will then ask you for a name, then click save.

Done :-)

share|improve this answer
    
I have 359 different colors in text format, I would really like an automation of some sort for that. –  user1306322 Oct 1 '12 at 15:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.