How to swap colors? - RealWorld forums

Log-in or register.

How to swap colors?

change all pixels rgb 41,41,41 to 229,90,19.
vmars316
on March 16th 2012

Greetings,
I downloaded/installed your RWPaint.
How can i swap colors in an image?
Maybe change all pixels rgb 41,41,41 to 229,90,19.
Thanks...vmars316

Vlasta
on March 17th 2012

The easiest way would probably be via the floodfill tool with tolerance set to 0. You would have to click all regions with the 41,41,41 color. You could also use the Custom operation command in the Effect menu and place this code there:

var image = Document.RasterImage;
var sizeX = image.sizeX;
var sizeY = image.sizeY;
for (x=0; x<sizeX; x++)
	for (y=0; y<sizeY; y++)
		if (image.GetPixel(x, y, 0, 0) == 0xff292929)
			image.SetPixel(x, y, 0, 0, 0xffe55a13);

the 0xff...... are the color representation in hexadecimal code

Anonymous
on July 17th 2016

Is there another faster way to do this? I remember looking through the site and finding someone linking to a script that you download and add to Realworld paint which automatically did this process.

pawanlee
on March 24th 2018

can you explain in detail

beingsakshijain
on October 18th 2018

Can you please enlighten with more details

Anonymous
on February 4th 2020

Color swapping in Photoshop is both a fun thing to do and a very handy tool for product photographers with clients in need of options. It’s not a hard technique and it only takes a try or two to get it right. This article outlines two methods for how to swap colors in Photoshop

Page views: 10553       Posts: 6      
Vista & Win 7 icons
Select background
What about ICL files?