# Help: How to change a color range to a different color range?



## chemistry_geek (Oct 3, 2004)

I am writing my thesis now and have a few images where I would like to change YELLOW text on a WHITE background to another color (Purple).  The background must be white, so the color of the text must change.  The images to which I am referring were generated in a molecular graphics viewer called Chimera (http://www.cgl.ucsf.edu/chimera/), and I could not find a way to change the color of bond lengths from YELLOW to any other color.  I simply want to substitute YELLOW for another color.  The graphics programs that I have include The GIMP and Adobe Photoshop CS.  Attached is a reduced scaled image.

Any suggestions would be very much appreciated.


----------



## mdnky (Oct 3, 2004)

You could try selecting the yellow parts, then using the Hue/Saturation adjustment on them (285/25/-55, colorize)...maybe adjusting those figures a bit to get the color you want.  The version you attached is too small (fonts are way too anti-alased) to get a good result from, so I'm not sure if this would work OK or not.  

You could always just find a similar font and retype what's in yellow in purple within PS-CS.


----------



## smithy (Oct 4, 2004)

Hi well i tried to recover the yellow text and yeah i hope this helps.

What i did: Used the colour replacer tool in fireworks mx and then adjusted the levels to  bring out the more parts of the purple text and the image. 

I would strongly suggest to redo the numbers because like said above they are too anti-aliased to read and if you print them you wont be able to read them. Hope this helps


----------



## chemistry_geek (Oct 4, 2004)

Thank you all for the responses.  The image I attached was for example. The real image is WAY BIG!  I used Adobe Photoshop CS to scale it down so I could post the example image to provide perspective about the issue.  Can this modification (color replace) be done in Adobe Photoshop CS or The GIMP?


----------



## Natobasso (Oct 4, 2004)

It looks like the image was created in a vector program. If you could get that image in its original format you could more easily change the numbers. Also, if you have illustrator you might be able to open the original Chimera image and edit the text by selecting all of it. You'll get the best result this way.

However, the previous poster's suggestions are sufficient from the looks of it.


----------



## chemistry_geek (Oct 4, 2004)

The original image is a PNG file, portable network graphics; I converted it to JPEG for easy viewing.  The picture was generated by molecular modelling software.


----------



## Natobasso (Oct 4, 2004)

Definitely try to import your PNG into illustrator. You might be able to more easily (and cleanly) manipulate the graphic as vector rather than raster.

I downloaded the program (looks neat) and might try it myself tonight. Could you send me the actual file?


----------



## gdekadt (Oct 4, 2004)

This image looks like a nice clean example for the Hue/Saturation adjustment as mentioned by mdnky. 

I'd Call up the dialogue (Apple-U in PS 7) select "Yellows" (Apple-2) from the Edit pop-up menu and adjust the various sliders. There's only three sliders to try out but try but you might be OK with just dragging "Hue" all the way to the left (or right - as they always meet at the extremes). Should take about ten seconds give or take - and you won't need to output your file again.

Images aren't always this easy but in this case it's a piece of cake.

Gabs


----------



## chemistry_geek (Oct 4, 2004)

Natobasso,

I'll try and post the file tonight; it isn't large, just a few KB.  The image above is a small portion of a larger molecule.  You'll be very pleased when you see the molecule. It's pretty cool, and the molecular surface generated by Chimera by default excludes the ligands posted above.  So it looks like you're seeing a few molecules inside the pocket of a larger molecule.  The image above is a model compound for the active site of the aminopeptidase enzyme in _Aeromonas proteolytica_.


----------



## mdnky (Oct 4, 2004)

Work alot better and much faster than my method...still a bit anti-aliased, but it might work alright on a higher quality original.  Same key combos in PS-CS as described.  Best result seemed to be +180, +100, +10.  Purple in PS, but shows blue no matter how you export/save it.



			
				gdekadt said:
			
		

> This image looks like a nice clean example for the Hue/Saturation adjustment as mentioned by mdnky.
> 
> I'd Call up the dialogue (Apple-U in PS 7) select "Yellows" (Apple-2) from the Edit pop-up menu and adjust the various sliders. There's only three sliders to try out but try but you might be OK with just dragging "Hue" all the way to the left (or right - as they always meet at the extremes). Should take about ten seconds give or take - and you won't need to output your file again.
> 
> ...


----------



## smithy (Oct 5, 2004)

chemistry_geek,

I would probly strongly suggest if you do not have the original vector path image, just to grab all the numbers and basically re-do them only if there still to anti-aliased in the larger original png image. The Png image that you have probly wont come up with the paths depending on what type of png it was commpressed to, from my understanding. My way only took about a couple of seconds to do and basically just gives you the numbers easier to read although compared to mdnky's image his/her is clearer. like i said just to re-cap do what ever you can just to read the numbers and if there still un-readable redo them because if you cant read it on the screen you wont have any luck if you do ever print it out .....


----------



## chemistry_geek (Oct 5, 2004)

Here are the molecule files in a compressed ZIP file.  The .CIF file is the original X-ray crystallography file; the others were converted to their respective formats from the CIF file.  Note, when I use Chimera to view the molecule, I use the .MOL2 file format, though the PDB file also should work; you only need one file to view the molecule.  Chimera does not currently read CIF files, which I find very strange since so much X-ray crystallography is done in that format.  When viewing this molecule, please note that there are some solvent molecules (dichloromethane) trapped in the crystal that I specified to be hidden in my images.  Enjoy!

P.S. Adobe Photoshop CS saved the day.  I used the Enhance > Replace Color feature and adjusted the "fuzziness" to encompass all variations of yelloe and changed YELLOW to BLACK.  Works quite nicely.  Thank you to all who offered suggestions; this really helped me when I was in need.


----------



## Natobasso (Oct 5, 2004)

I tried using the files, but none were recognized by Illustrator. I wonder if you could output either .ai, .eps, .pdf, cad or some other vector format; then we might be able to really manipulate your drawings. They look like vector format to me.


----------



## Natobasso (Oct 5, 2004)

(.dxf files are the usual cad format)


----------



## chemistry_geek (Oct 6, 2004)

All the files I uploaded are various standards for x-ray crystallography data formats.  "PDB" standards for "Protein Data Bank," "MOL" stands for "molecule" format.  These standards arose from different or newer methods for visualizing molecuar structures with more or different data.  I doubt that a CAD or desktop publishing program would be able to read them files and correctly draw a 3-dimensional structure.  You will have to use Chimera or another molecular file viewer to see the structure I uploaded.


----------



## Natobasso (Oct 6, 2004)

Right! Oops. I forgot I even downloaded the program. I will get back to you when I have a chance to play with the files you sent me. Stay tuned


----------

