Post Reply 

Strange behavior of color layer mode

Nov 11, 2011, 13:22
Post: #1
Strange behavior of color layer mode
Hi,

I notices by my opinion unexpected behavior of "color" mode if applied to upper layer in layers dialog.

I believed it should take hue and saturation from current(upper) layer and value (brightness) from below layer. As long as the two layers do not differ in brightness it seems to work properly. But the problem is when they differs...


I believe that the results should be same as if I make two copies of upper layer, one set to "hue" second to "saturation" mode...

Or another test: when I swith the two layers (reffering to first scenarion above), and set the above layer to "value" mode, ther results are OK.

So perhaps I dont understand what "color" mode is exactly doing...

My question should be like - does color mode work properly by our opinion?
Find all posts by this user
Quote this message in a reply
Nov 11, 2011, 13:40
Post: #2
RE: Strange behavior of color layer mode
I confirm that it's not really Hue + Saturation as said in the doc. There is a mix of the saturation with the saturation of the layer below IIRC. And in practice it's a bit more usable the way it is.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Nov 11, 2011, 13:59
Post: #3
RE: Strange behavior of color layer mode
Well I'm writing a plugin that generates "color mask" and now I found that the results (when using color mode on it) are very different to what I expected. In fact, this "better functionality" damages my effort...

I noticed that when origianal is bright, resulting colors are strongly desaturated...

Chances are that I would adjust my algorithm to be compatible with gimp's algorithm but it is extra work. And then I first need to find out gimp's algoritm...
Find all posts by this user
Quote this message in a reply
Nov 11, 2011, 14:15
Post: #4
RE: Strange behavior of color layer mode
You can use the Colors/Component/Decompose and Colors/Component/Recompose and work on the saturation layer... (Decompose/Recompose supports several component models, one, may be better suited to your use).

Otherwise, brush up your math, and find the equivalent change in RGB Smile

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Nov 11, 2011, 21:01
Post: #5
RE: Strange behavior of color layer mode
Ofnuts,

I need it to be as simple as possible.

BTW, I already used gimp's in-build HSV <-> RGB conversions.
I converted RGB to HSV, set V to 0,5, and converted it back to RGB. Still when I set upper layer to color mode it doesnt work properly.

I would need exact formula what color mode is doing. May be I need to look into source.

For your information, I work on this:
http://code.google.com/p/selective-color...troduction
Find all posts by this user
Quote this message in a reply
Nov 11, 2011, 23:31
Post: #6
RE: Strange behavior of color layer mode
(Nov 11, 2011 21:01)TiborB Wrote:  I would need exact formula what color mode is doing. May be I need to look into source.
Yes... That's what I ended up doing, since no one answered my question on the Gimp-developer list. From the breadcrumbs I kept in a file during my long quest for the answer, the answer would be in app/paint-funcs/paint-funcs.c or pretty close to (that's the end of my breadcrumbs). But I don't remember the answer precisely Smile

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Color alpha function and its current errors Fuse809 0 235 Oct 11, 2014 03:53
Last Post: Fuse809
  GIMP 2.8 Eyedropper Color Selection Tool Not Working? Upgraded App is Slow?? tootallll 14 9,677 Oct 9, 2014 18:39
Last Post: Graphicman2014
  Using Color/Levels causing phosterization photos piotrkast 5 466 Oct 8, 2014 12:06
Last Post: ofnuts
  New layer color... btraven 0 208 Oct 2, 2014 00:47
Last Post: btraven
  Dragged Layer Dropping Issues darkikuto18 3 259 Sep 29, 2014 07:56
Last Post: fluffybunny2

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS