GIMP Chat http://gimpchat.com/ |
|
Python Plugin: Colourwheel Analysis http://gimpchat.com/viewtopic.php?f=9&t=13786 |
Page 1 of 1 |
Author: | rebecca2525 [ Sat Mar 12, 2016 7:04 am ] |
Post subject: | Python Plugin: Colourwheel Analysis |
I made a Python plugin that analyses the hue/saturation values used in an image and displays them on a colour wheel: Not as pretty as some of the other scripts here, but maybe of use to some. You can download the plugin from github where I also put up more detailed instructions. Code-wise, I'm not completely happy with my little gimpfu import hack for the unit tests, but the proper way – putting the gimp-independent functions in a separate file – would have been more of a hassle for the users. |
Author: | MareroQ [ Sat Mar 12, 2016 8:38 am ] | ||
Post subject: | Re: Python Plugin: Colourwheel Analysis | ||
Hi Rebecca. This is the only information (output color wheel) - is there any practical use?
|
Author: | rebecca2525 [ Sat Mar 12, 2016 11:37 am ] |
Post subject: | Re: Python Plugin: Colourwheel Analysis |
Yes, that's the only information the plugin produces. The idea is that you can "reverse engineer" existing pieces of art and see what colours were used in them. What colours to choose for your art (be it painting, digital art, photo, movie etc) is an important decision to make – you don't always want to use the full range of colours available, but rather limit your palette to achieve harmonic results or specific moods. I'm currently reading "Color and Light" by James Gurney, who describes limited palettes and gives examples by placing geometrical masks called gamut masks on a colour wheel. He's also made a couple of blog posts about it. That's what inspired me to make this plugin so that I can inspect the colour wheel distribution of various things. Of course, it doesn't really help you if you want to paint something from scratch, for that, you need to have something that limits your palette. MyPaint lets you set gamut masks on the colour wheel, and it has an export to GIMP palette option, but I paint in MyPaint anyway, so I haven't tried the export. For example, to paint something like my example above with the yellow trees, I could use a mask like this: Quite interesting that a random snaphot I took turns out to have almost a perfect triangular gamut mask like right out of a textbook. Your expample, too, has a very limited palette that's almost triangular. |
Author: | trandoductin [ Sat Mar 12, 2016 11:56 am ] |
Post subject: | Re: Python Plugin: Colourwheel Analysis |
I was wondering about the color wheel formula? Like I wonder if it's good way of replacing colors like rotating colors... Where you have your colors mapped to a position on a circle now... What if you had 2 pictures...and then you'd replace one color at a time based on distance from center and angle so that you can replace one picture's color with another... I am just thinking out loud not sure how I would do it. |
Author: | rebecca2525 [ Sat Mar 12, 2016 12:10 pm ] |
Post subject: | Re: Python Plugin: Colourwheel Analysis |
The colour wheel is based on the hue, saturation, lightness (HSL) notation of colours, rather than RGB. Hue is the angle in the wheel, saturation is the distance from center (the most desaturated in the center, the most saturated on the out-most circle). Lightness (amount of white) is not displayed on the wheel. GIMP has a couple of stuff under the "Color" menu that let you change those values on an existing image, like "Adjust Hue/Lightness/Saturation". |
Author: | trandoductin [ Sat Mar 12, 2016 12:34 pm ] |
Post subject: | Re: Python Plugin: Colourwheel Analysis |
Maybe i can use your script then use rotate colors to do what i want. |
Author: | Rod [ Sat Mar 12, 2016 12:40 pm ] |
Post subject: | Re: Python Plugin: Colourwheel Analysis |
This is what i was thinking the plug-in could be used for. Fixing off color photos of the same subject. Say you take a picture of a person in a different lighting situation and want to create the same lighting in another photo of the same subject material. Just a thought. As we all well know different lighting types and shades create different colors from the same image. |
Author: | RobA [ Sat Mar 12, 2016 8:09 pm ] |
Post subject: | Re: Python Plugin: Colourwheel Analysis |
Rod wrote: This is what i was thinking the plug-in could be used for. Fixing off color photos of the same subject. Say you take a picture of a person in a different lighting situation and want to create the same lighting in another photo of the same subject material. Just a thought. As we all well know different lighting types and shades create different colors from the same image. That is what I wrote my histogram match script to automate! -Rob A> |
Author: | dinasset [ Sun Mar 13, 2016 1:47 am ] |
Post subject: | Re: Python Plugin: Colourwheel Analysis |
Rob, thanks for recalling it. It's really wonderful. Here a quick (and not optimized example, only to show): a) source image Attachment: DSCF1060_base.jpg [ 145.38 KiB | Viewed 4566 times ] b) image to modify Attachment: DSCF1339.JPG [ 1.75 MiB | Viewed 4566 times ] see in the next post what can be obtained... |
Author: | dinasset [ Sun Mar 13, 2016 1:51 am ] |
Post subject: | Re: Python Plugin: Colourwheel Analysis |
using HSV Attachment: DSCF1339-HSV.JPG [ 2.01 MiB | Viewed 4565 times ] using LAB Attachment: DSCF1339-LAB.JPG [ 2.14 MiB | Viewed 4565 times ] note that this is an EXTREME test, done QUICKLY and without any further OPTIMIZATION. Wonderful script ! |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |