Skip to main content
September 14, 2019
Question

How to change colour background in a gif? [2019]

  • September 14, 2019
  • 3 replies
  • 13543 views

I need to understand how to change colour background in a gif?

I mean  like this:


The main figures are  still colourful in the gifs, but the background around them is black.
How to do it in Photoshop?

3 replies

Maiane Gabriele
Inspiring
September 14, 2019

If I really understand what you need, do you want to change the black color? If so...

  1. Open your gif at photoshop. If you've timeline panel activated you'll see that there are a lot of frames from your animation. There are also a lot of layers, which one represent a state of yours animaton.
  2. Select any layer, it can be the last one that will be activated by default.
  3. Duplicate it (ctrl + j).
  4. Sent it to the top of your layers ( ctrl + shift + ])
  5. Right now you can change wherever you want on it, don't worry about pics right now. If you want to change the black I think the easieast way is by creating a new layer with a fill color (Layer > New fill layer > solid color) and choose the color you want. 
  6. Select the layer you've created and set it transparency mode to lighten (Shift + alt + G).
  7. Now select both layers you've created (the image and the fill layer).
  8. Group these layers (ctrl + g)
  9. Create a mask in this group (ctrl + .). If you're not familiar with mask it works like that: you'll see that in the layers panel, besides your group now it have a white retangle, this retangle is your mask, everything that is white in this retangle is waht you can see, everything that's in black you can not see.
  10. Since you just want the borders of your image in black and not the pics, you've to paint of black the part you don't want to be of other color in your group mask. In order to do that, select the white retangle next to your group, select any brush (B) you want, I suggest a rounded blurred one, set black as your main color (press D, than X). Now paint of black everything you don't want to change colors.
  11. After that you just have to save your gif.

 

This is the result I got, just doing it in a fast way:

 

September 14, 2019

Hi! No, I don't want to change black colour into different colour.
I want to take colourful gifs and make background in the gifs black - except for moving figures on it.
Like in the gifs I posted.

Kevin Stohlmeyer
Community Expert
Community Expert
September 14, 2019

It's a simple composite using layers.

This is using either a mask on the video layers and a black background or black layer overlayed on top of the video layer.

September 14, 2019
Could you please elaborate?
davescm
Community Expert
Community Expert
September 14, 2019

Hi

You can open a gif in Photoshop where each frame is a layer.
Then you can mask them and add other layers just the same as you would do in a still image. The final step is to go through each frame and turn on/off visibility of the layers required in each frame before saving as a new gif.

 

Dave

September 14, 2019

Hi!
Could you please  describe this process in more details? Step by step?

davescm
Community Expert
Community Expert
September 14, 2019

In the examples you show - the black layer and the text are not moving so just add them at the top of your layer stack.

 

 

If you did need them to move the black area or text then you will need to animate them by duplicating the additional layers and moving /altering them as needed. Finally step through the animation in the timeline and ensure the correct layers are turned on for each frame.
Dave