Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Extracting colors in Photoshop

Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
06-11-2005 09:08
I've searched this section on a number of keywords, but I still may have missed it. I've also Google'd the web and found a little information -- I have the base concept down. The problem is, I can't actually get it to work. This ought to be Photoshop 101. Unfortunately I'm still trying to get the teacher to promote me out of Photoshop .0001 :)

Here's the problem: I have a small square of creme-colored lace texture. It has two colors - the foreground (the actual lace itself) is white. The background in the pic is slightly darker (see the small .jpg file attachment).

What I want to do is separate these colors and make the background darker or more transparent depending on the look I'm after while keeping the foreground intact. So essentially I need to be able to select the very complex darker color and cut/paste it to a different layer.

I'd be very disappointed if there wasn't a slick way of doing this in Photoshop, other than painstakingly using the free-form cut tool to outline all the foreground bits by hand :(

Could someone smack me on the head and point to the tool I want, please? :)
_____________________
China Frost
Registered User
Join date: 4 Mar 2005
Posts: 16
06-11-2005 09:24
You want the magic wand tool. From the swatch you provided it looks like you would find it easier to select all the areas you want transparent. Once you have done that, right click and 'select inverse'. Right click again, 'save selection'. This will give you your alpha layer.

On your alpha layer you can chage the black to different shades of gray to control how transparant you would like it to be.

I hope this helps!

note: with the magic want tool, hold down 'shift' to select multiple areas as needed.
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
06-11-2005 13:36
Hi Cindy;

Separating two colors that are very close in value is one of the tricker things to do in Photoshop; not a simple operation at all.

There are a number of ways to do it. I don't recommend the Magic Wand, since it's not exactly interactive in this case. In other words, you can't see what you're getting until you have committed to it.

The way I normally do this is to use the Select > Color Range command. For this particular image, I would recommend starting with a Selection Preview of None, and just running the eyedropper over the background pixels, to see which one gives you a nice lace pattern in the Preview.

When you have an idea, you might want to change to Selection Preview > Black Matte, which will allow you to see what you're getting on the image itself. Be aware that the lace will be black, and the background will be the lighter colors actually present. In other words, the image will appear to be reversed.

If you have a hard time wrapping your brain around that, just click the Invert button on the right side of that panel, and you'll see the selected areas as black, which will give you light lace on a dark background.

Hold down the Shift key, and continue using the dropper, to select more of the background colors. Use the Fuzziness slider to select the colors that are close in value to the ones already selected.

Since you can see what you're getting as you work, you should be able to fine tune it without any problem.

When it looks right, just click OK, and you'll have the Marching Ants. Tap the Make Mask button at the bottom of the Layer Palette, and you'll have your mask.

I would just work with that, using a solid color layer underneath to change the color, and the mask itself to make the transparency.

But, if you want to get those pixels into a layer of their own, duplicate the layer by dragging it onto the New Layer icon, click on the thumbnail of the mask to select it, and then go to Image > Adjustments > Invert to invert it.

That will isolate those pixels.

There are, as I said, other ways; and some are arguably more accurate. But this is probably the fastest one that will give you good results.
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
China Frost
Registered User
Join date: 4 Mar 2005
Posts: 16
06-11-2005 19:29
boy, do I have a lot to learn ^. .^

Thanks Robin!
Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
06-11-2005 22:21
China, thank you for your try anyway. I checked it out, but as Robin notes it wasn't real satisfactory.

Thanks as well to Robin. I'm going to try this out in the morning when I've had some sleep. :)
_____________________
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
06-12-2005 11:25
Robin mentioned the way I'd do it... using select by color range.

Another way you can go if you find that's not working well because the colors are so close together is to do the following...

Duplicate the layer. Use Image/hue & saturation and take the saturation down to 0 so you have a grayscale layer. Use Image/Levels to make the darker color black and the lighter color white. Adjust the midtone slider to help clean up noise in one or the other colors. Now you can use the magic wand or select by color range to more easily seperate the two. When you have the selection you want, switch back to the color layer.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
06-12-2005 13:48
Anytime, Cindy; glad I can help. :D

You can also use Chip's method, but then, instead of using the Magic Wand or Select Color, Select All and Copy that grayscale layer.

Then Duplicate the Background layer again, make a Layer Mask by clicking on the icon at the bottom of the Layers Palette (it will all be white,) Option/Alt click on the Mask thumbnail to see it in isolation, and simply Paste the grayscale layer into it.

Don't forget, too, that sometimes one or another Channel will show more separation of values than the color (or grayscale) image.

The easiest way to take advantage of that, if you find that there is one that will work for you, is to duplicate the channel, and then use the Levels to further exaggerate the differences in the duplicate.

Make a copy of the Background layer, as before, but this time Load Selection and choose the channel copy before you Make Mask.

Don't forget to delete that extra channel, though, unless you just want to use that one as your Alpha Mask. SL doesn't do well with multiple Alpha channels.

There are also ways to get the Channel into the Layers Palette, where you can work with it, but it's a multi-step thing (when you copy/paste a channel, you get a new channel) so I won't go there unless you want to know. :D

In fact, if all you want is to see the lace and not see the background, changing the Layer Blending is even faster and easier; but I don't prefer it, since you can't tweak it pixel by pixel, like you can a mask. :)

There are, as we've said, lots of different ways to do this. :D
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
06-12-2005 14:04
Oh, Robin, I keep meaning to tell you how useful I've found the IOR table on your website. Thanks!
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
06-13-2005 08:38
Robin and Chip:

I tried Robin's first method (Selecting Color Range) last night. While it didn't do what I was after, it was a fabulous learning experience :) My swatch of lace doesn't have enough color differentiation to do it very well with that method, but I have plenty of others which will lend themselves to this technique very nicely. Chip's suggestion and Robin's second one look like they bear investigation.

I ended up copping out *guilty look*. I simply turned the whole darn layer down to 70% opacity, which got it close. It's far from perfect, but now I have 2 new methods to try as soon as I get home!

Thanks to both of you once again. I can see that Photoshop is going to be a long learning venture for me, but I like learning ventures.
_____________________
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
06-13-2005 11:45
Cool, Chip! I'm glad that they are helpful to you. :)

Cindy, I tried it with the .jpg that you posted here, and got fairly acceptable results. Do you want me to post the Levels that I used?

I need to upgrade to Quicktime Pro. Again. (I accidentally tapped the Automatic Upgrade button without checking to see what it was upgrading, and found myself with Quicktime 7. Note to Self; Look before you click!) But once I've done that, I can make a video tut of the method, if anyone is interested.

In fact, if you want to send me an image of that lace, Cindy, I can make it using your swatch. :D

Or I can give you another method, using Calculations, which has a lot of trial and error in it, but usually does the job. But it can be very time-consuming to do, although very accurate, and I find that it's often easier, when using something like this where you need only a very small swatch to make the Repeat, to use Color Range and then manually tweak the mask.

Let me know!
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
Namssor Daguerre
Imitates life
Join date: 18 Feb 2004
Posts: 1,423
06-13-2005 13:55
Extensis Mask Pro (a plug in for PS) will get you better results than PS's tools if you can afford the $300 for it. If not, here's my 2 cents on what has been mentioned so far.

I like Robin's selective color range method because it is basically encapsulated in one dialogue box from start to finish, and very easy to follow.

Chips's method will produce very good results too.

Here's a method I've employed in the past for patterns that are embedded in relatively neutral backgrounds.

1. Use the Eye Dropper and sample the background around the lace with a 5x5 pixel average.
2. Create a new layer above the lace and fill it with the sampled color.
3. Select the "difference" layer effect for this new layer (the image will turn very dark)
4. Select/All, Edit/Copy Merged, switch to the "Channels" tab, create a new channel, Edit/Paste
5. Finally, run an "Auto-Levels" adjust on the new channel and Invert it.

The end result looks like this below:
_____________________
Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
06-13-2005 14:33
From: Robin Sojourner
Cindy, I tried it with the .jpg that you posted here, and got fairly acceptable results. Do you want me to post the Levels that I used?

Oh could you please? I still want to master this technique, but seeing the result in a psd file would be very helpful!

From: someone
In fact, if you want to send me an image of that lace, Cindy, I can make it using your swatch.

I actually posted the only piece I had :) I was hoping to clone it and spread it over a pattern to create some lace garments.

Thanks again!
_____________________
daz Groshomme
Artist *nuff said*
Join date: 28 Feb 2005
Posts: 711
06-13-2005 14:48
From: Cindy Claveau
I've searched this section on a number of keywords, but I still may have missed it. I've also Google'd the web and found a little information -- I have the base concept down. The problem is, I can't actually get it to work. This ought to be Photoshop 101. Unfortunately I'm still trying to get the teacher to promote me out of Photoshop .0001 :)

Here's the problem: I have a small square of creme-colored lace texture. It has two colors - the foreground (the actual lace itself) is white. The background in the pic is slightly darker (see the small .jpg file attachment).

What I want to do is separate these colors and make the background darker or more transparent depending on the look I'm after while keeping the foreground intact. So essentially I need to be able to select the very complex darker color and cut/paste it to a different layer.

I'd be very disappointed if there wasn't a slick way of doing this in Photoshop, other than painstakingly using the free-form cut tool to outline all the foreground bits by hand :(

Could someone smack me on the head and point to the tool I want, please? :)


geez, amatures, selective color, white remove black, add black to yellow etc....
_____________________
daz is the SL pet of Sukkubus Phaeton
daz is the RL friend of Sukkubus Phaeton
Sukkubus Phaeton, RL, is the official super-model for the artist SLy and RLy known as daz!
daz is missing the SL action because he needs a G5 badly
Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
06-13-2005 14:50
From: daz Groshomme
geez, amatures, selective color, white remove black, add black to yellow etc....

It's good to know that YOU've never been new at learning a piece of software.
_____________________
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
06-13-2005 15:08
From: Namssor Daguerre
Here's a method I've employed in the past for patterns that are embedded in relatively neutral backgrounds.

1. Use the Eye Dropper and sample the background around the lace with a 5x5 pixel average.
2. Create a new layer above the lace and fill it with the sampled color.
3. Select the "difference" layer effect for this new layer (the image will turn very dark)
4. Select/All, Edit/Copy Merged, switch to the "Channels" tab, create a new channel, Edit/Paste
5. Finally, run an "Auto-Levels" adjust on the new channel and Invert it.


Oh nice. I wouldn't have thought of that one! God I love PS :)
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
daz Groshomme
Artist *nuff said*
Join date: 28 Feb 2005
Posts: 711
06-13-2005 15:21
From: Cindy Claveau
It's good to know that YOU've never been new at learning a piece of software.
actually i shouldn't have posted that, and did want to help, i was being literally kicked in the ass to go, but here's what I would do.

Selective color, like I said then select similar on one or the other copy/paste as a new layer, adjust some more, merge layers. Selective color is one of the most powerfull tools in PS. plz feel free to ask more questions, there is a lot of talent here and I didn't mean my reply to be snotty, it just was written in haste.
_____________________
daz is the SL pet of Sukkubus Phaeton
daz is the RL friend of Sukkubus Phaeton
Sukkubus Phaeton, RL, is the official super-model for the artist SLy and RLy known as daz!
daz is missing the SL action because he needs a G5 badly
Sami Tabla
Eternal Newbie
Join date: 12 Jun 2004
Posts: 52
06-13-2005 16:34
From: Robin Sojourner
...I need to upgrade to Quicktime Pro. Again. (I accidentally tapped the Automatic Upgrade button without checking to see what it was upgrading, and found myself with Quicktime 7. Note to Self; Look before you click!)...


You can get 6.5.2 for Mac from here;

http://www.apple.com/support/downloads/quicktime652formac.html


and use your older Pro key to get back to prior functionality...
_____________________
"Even a Wizard is a Newbie at Times..."
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
06-13-2005 17:14
Okay. I'm not sure how much help this will be without a video tutorial; but...

When I was doing the Select > Color Range, I used a fuzziness level of 26, and clicked in three places, holding down the shift key to add to the selection.

That gave me pretty much what I wanted; but just to make it a bit crisper, I option/alt clicked on the Mask thumbnail, so I could see the grayscale mask, and adjusted the Levels under Image > Adjustment > Levels. The the numbers I used for the Input Levels were; 84, 0.87, 224.

That gave me the image below. You are seeing the lace, with the background masked, and a solid blue layer below it.



However, all of that being said, I wouldn't recommend using this particular bit of lace. It's pretty low resolution, and the image has an unpleasant oddness in the Repeat in several places. In other words, it's clearly a mirrored tile, and not the kind of pattern you get in a piece of whole lace.

It's not as obvious in the small swatch, but when you use a different background color, it becomes quite clear.

If you have better lace swatches, I'd use those instead.
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
06-13-2005 17:15
ROFL! Thanks so much, Sami!

If I'd read this post before I upgraded to Quicktime 7 Pro just now, I might have saved a few dollars. :D
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
06-13-2005 19:57
From: Robin Sojourner
Okay. I'm not sure how much help this will be without a video tutorial; but...

When I was doing the Select > Color Range, I used a fuzziness level of 26, and clicked in three places, holding down the shift key to add to the selection.

I think it was the fuzziness that threw me off, Robin.

From: someone
However, all of that being said, I wouldn't recommend using this particular bit of lace. It's pretty low resolution, and the image has an unpleasant oddness in the Repeat in several places. In other words, it's clearly a mirrored tile, and not the kind of pattern you get in a piece of whole lace.

Aha! Ok so that leads me to another question, then. I have a wide range of free graphics and texture resources around the web from my old Poser days. That's where I got that particular piece of lace. But I also have a flatbed scanner (older HP but in great shape) that I still have to hook up to my computer. No digital camera (which would be my first choice I think). So I'm thinking perhaps hi-rez scans of material scraps I can get at the local cloth store? What do you think?
_____________________
Cindy Claveau
Gignowanasanafonicon
Join date: 16 May 2005
Posts: 2,008
06-13-2005 19:57
From: daz Groshomme
plz feel free to ask more questions, there is a lot of talent here and I didn't mean my reply to be snotty, it just was written in haste.

Thanks, daz, I appreciate that :)
_____________________