It is currently 13 Apr 2021, 20:46

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Invert Foreground/Background Color Script

Share your Python Fu Scripts/plug-ins for GIMP here
tim
GL Blogger

Invert Foreground/Background Color Script

Post#1 by tim » 29 Jun 2018, 20:21


Invert background or foreground color script banner/

As I was creating different banners, sometimes I needed a way to quickly invert the working foreground/background color.
But I found myself having to draw using foreground color then invert it using Colors/Invert then use the color picker tool to pick that inverted color.

I don't know if exists a quick way of inverted the foreground color or background color in GIMP, I searched for it but didn't find anything that mentioned how to do it.

So I created this script. To quickly invert the working foreground color or working background color.
invert_colors.zip #
zipped .py file (unzip, put in your GIMP's /plug-ins/ folder) Tested in GIMP 2.8 and GIMP 2.10
(931 Bytes) Downloaded 157 times
invert_colors(2).zip #
version 2. Changed to not prompt user for image/layer as inputs as they're not needed
(973 Bytes) Downloaded 167 times
Script Menu Location: Colors/Invert Foreground Color and Colors/Invert Background Color

Instructions:
  • If you don't have an image opened already, when you run script it'll ask for image and layer as input which aren't used/needed so you can just click "OK" to skip it and it'll run.
  • If you have an image opened already, when you run script, the script will automatically run without asking for any inputs.
Youtube video demonstrating usage of this script:
aka Tin

         

Pat625
Tutorial Creator

Post#2 by Pat625 » 29 Jun 2018, 23:32


Sounds very nifty! When I can get to my computer, I have to try this!

tim
GL Blogger

Post#3 by tim » 29 Jun 2018, 23:37


You must try it, once you have it you won't believe how you lived without it :D
aka Tin

         

Pat625
Tutorial Creator

Post#4 by Pat625 » 30 Jun 2018, 05:28


I tried it to see what you were doing. I don't think that I would be using it that often. You must have to go back and forth between colors a lot. I can see it usefulness there.

rich2005
GIMP Guru

Post#5 by rich2005 » 30 Jun 2018, 11:41


Is this not the same as the keyboard shortcut - the 'X' key

Use it all the time especially with quickmask

edit:
OK, I can see the difference, but not the point ;)

tim
GL Blogger

Post#6 by tim » 30 Jun 2018, 14:10


rich2005 wrote:
30 Jun 2018, 11:41
Is this not the same as the keyboard shortcut - the 'X' key

Use it all the time especially with quickmask

edit:
OK, I can see the difference, but not the point ;)
I thought you were going to tell me a short cut key that inverts that background/foreground color and I would feel really stupid for making a script for something that already exists. I am surprised there isn't a way to do it like control click on to invert it or something.
aka Tin

         

rich2005
GIMP Guru

Post#7 by rich2005 » 30 Jun 2018, 14:26


Yeah, but the effect is the same

When using a layer mask or a quick mask, you are always swopping FG/BG to paint in or paint out parts. What is the advantage of having both the same colour and the added work-flow of using the your plugin?

tim
GL Blogger

Post#8 by tim » 30 Jun 2018, 14:37


I thought X swaps the colors.
My plugin is when let's say you have foreground as Red and background as Blue and you want foreground to be inverted color of Red not swapped but the inverted color of Red whatever that might be.
aka Tin

         

rich2005
GIMP Guru

Post#9 by rich2005 » 30 Jun 2018, 14:55


OK, red inverts to cyan.

Leave you to give some examples of where this will be used ;)

tim
GL Blogger

Post#10 by tim » 30 Jun 2018, 16:27


I use it when I want a quick inverted color to stand out on existing drawn color.
aka Tin

         


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 14 guests