17

I have PNG images that represent playing-cards. They are the standard colours with Clubs and Spades being blank and Diamonds and Hearts being red.

I want to create a 4-colour deck by converting the the Clubs to green and the Diamonds to blue.

I don't want to re-draw them but just changing them by hand seems a lot of work since the colours are not all "pure" but graded near the edges.

How do I do it?

theblitz
  • 6,683
  • 16
  • 60
  • 114
  • 1
    Are you trying to do this programmatically? If so, what language? If not, what software do you have installed? (Photoshop, Paintshop Pro, GIMP, etc) – joe_coolish May 19 '11 at 13:52
  • xv's colmap window does this as well (you can use `convert`'s `-fill` and `-opaque` functions to do it command line but it's insanely slow –  Feb 18 '19 at 22:47

6 Answers6

15

Photoshop - right click layer -> blending options -> color overlay change color and save

priyamano
  • 190
  • 1
  • 3
7

This should be fairly straightforward in the gimp http://gimp.org/

First make sure your image is RGB (not indexed color) then use the "color to alpha" feature to turn the clubs/diamonds clear, then fill or set the background or whatever to get the color you want.

JasonWoof
  • 4,176
  • 1
  • 19
  • 28
  • Downloaded the latest version of gimp but it fails to launch. Installs ok but then refuses to open. – theblitz May 19 '11 at 18:28
  • If you're on Mac, you'll need X11, as described in the Requirements section of the download page: http://www.gimp.org/macintosh/ – JasonWoof May 20 '11 at 16:10
5

If you are going to be programming an application to do all of this, the process will be something like this:

  1. Convert image from RGB to HSV
  2. adjust H value
  3. Convert image back to RGB
  4. Save image
Community
  • 1
  • 1
joe_coolish
  • 7,201
  • 13
  • 64
  • 111
3

Use Photoshop, Paint.NET or similar software and adjust Hue.

Kaitnieks
  • 922
  • 1
  • 8
  • 15
  • http://www.getpaint.net/ – Kaitnieks May 19 '11 at 19:46
  • Good idea - but with Paint.NET you are guessing when trying to do it. The way preffered is something where you could pass RGB or Hex Value and it turns it to this color - and HUE at least with Paint.NET just does not cut it since you have to guess with the scroller. Better than nothing though – Alexey Shevelyov Nov 02 '16 at 23:18
0

Ok guys it can be done easy in photoshop.

Open png photo and then check image -> mode value(i had indexed color). Go image -> mode and check rgb color. Now change your color EASY.

Vasyl Gutnyk
  • 4,813
  • 2
  • 34
  • 37
0

If you are like me and Photoshop is out of your price range or just overkill for what you need. Acorn 5 is a much cheaper version of Photoshop with a lot of the same features. One of those features being a color change option. You can import all of the basic image formats including SVG and PNG. The color editing software works great and allows for basic color selection, RBG selection, hex code, or even a color grabber if you do not know the color. These color features, plus a whole lot image editing features, is definitely worth the $30. The only downside is that is currently only available on Mac.

CD-3
  • 63
  • 1
  • 10