google-code-export / gpick

Automatically exported from code.google.com/p/gpick
2 stars 0 forks source link

LCH Values are Jumpy #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I edit the LCH values of this color: #FAF0E6

And set the chroma to 100, the color I get has different L, C, and H components.

Instead, I would prefer to get a cropped chroma value if the colors falls out 
of the RGB gamut.

Original issue reported on code.google.com by nihilh...@gmail.com on 14 Apr 2012 at 11:05

GoogleCodeExporter commented 9 years ago
It would not be enough to limit the value of chroma, because both hue and 
lightness can also be outside of valid range. As soon as one of the LCH values 
is out of valid range, the RGB values are clipped and RGB->LCH conversion 
returns "wrong" results.

Another problem is that if we limit user to valid value ranges only, some of 
the adjustments become unnecessary hard (e.g. lightness has a very limited 
range because it depends on chroma). If you can, try attached patch.

I think that a small warning icon and valid range indication would be more 
useful.

Original comment by thezbyg on 16 Apr 2012 at 7:40

Attachments:

GoogleCodeExporter commented 9 years ago
I like the way you handled the problem but I would recommend using a stripped 
gray pattern (like the one used for transparent pixels in Gimp and similar 
programs) to indicate the invalid ranges instead of the current solid black: if 
allows to enforce an unambiguous distinction between valid and invalid ranges.

Original comment by nihilh...@gmail.com on 18 Apr 2012 at 8:25

GoogleCodeExporter commented 9 years ago
Interesting related Gimp plugin:
http://registry.gimp.org/node/16814

Original comment by nihilh...@gmail.com on 21 Apr 2012 at 10:09

GoogleCodeExporter commented 9 years ago
Stripe pattern implemented in revision c380ef83bbc9.

Original comment by thezbyg on 20 May 2012 at 8:15

GoogleCodeExporter commented 9 years ago
Very nice!
I noticed the stripe pattern sometimes get twisted (see attachment).

Original comment by nihilh...@gmail.com on 21 May 2012 at 8:16

Attachments:

GoogleCodeExporter commented 9 years ago
Pattern drawing fixed in revision 12f4e43c1303. Looks like a cairo library bug, 
so I will have to investigate this further.

Original comment by thezbyg on 22 May 2012 at 5:20

GoogleCodeExporter commented 9 years ago
Related Cairo bug: https://bugs.freedesktop.org/show_bug.cgi?id=51910

Original comment by thezbyg on 10 Jul 2012 at 5:40