GNOME Bugzilla – Bug 118166
Allow to enter color values as percentage or fractions
Last modified: 2018-05-15 20:25:34 UTC
Not sure if I picked the right component. GIMP 1.2 has GTK index colors in the color dialog box (index values between 0.0 and 1.0). This is great for at least OpenGL programmers and unfortunately GIMP 1.3 is missing that. Thanks, Reza Pakdel University of Calgary Department of Computer Science http://www.cpsc.ucalgary.ca/~hrpakdel
It is probably sufficient to add another input field besides R, G, B etc. for entering floating point values. At least RGB colors are often represented in range 0..1.
Another entry would clutter the GUI, otherwise we would have long done this.
How about a switch representation button or radio group?
Since noone is working on this, we will try to address it for 2.2.
This will, at least internally, be required to happen in the move to gegl. In particular, 2.2, if that is the milestone for the new pixel access model (which I hope it is), is a good milestone to set for this feature.
Daniel, you misunderstood this. This is solely a user interface feature. We already use doubles internally. It's just a matter of allowing the user to enter color values in the 0...100 range.
Shouldn't block the 2.2 release and it's probably too late to add this feature now.
Note that typically the 0..255 values are with sRGB gamma, while the 0..1 values are very often with linear gamma. So #bcaa80 is 0.5, 0.402, 0.216
*** Bug 167293 has been marked as a duplicate of this bug. ***
What about a "color unit" drop-down, working just as the size-related units? One could them choose, on each color input, wether to enter values in 0-255, 0-100% or 0.0-1.0 ranges.
Joao: that could be a good solution
Since the color choosers also contain a HTML/CSS hex representation of colors - it would be good to change away from the 0-255 range to 0.0-100.0(%) (and perhaps permit values beyond), since GIMP-2.9 permits higher precisions than 8bpc.
I think we have done this in 2.10 already, haven't we?
We indeed have, closing as fixed.
I think we can regard this commit for bug 770054 as the one which fixed this: commit 8447e775ab5165e1bce87addbb48f332bde349f7 Author: Michael Natterer <mitch@gimp.org> Date: Mon Mar 19 22:58:03 2018 +0100 Bug 783680 - Allow to hide color models in GimpColorScales Redo the entire thing again: - Rename the values of enum GimpColorSelectorModel to include "MODEL" - Change GimpColorSelector API from set_model() to set_model_visible() so visibility of each model can be toggled individually and is not exclusive any longer - The GUI is back to what it was before, except that the "GIMP" page now honors the model visibility and has a resonable minimum height libgimpwidgets/gimpcolornotebook.c | 64 +++++++++++- libgimpwidgets/gimpcolorscales.c | 209 +++++++++++++++++++++----------------- libgimpwidgets/gimpcolorselect.c | 190 ++++++++++++++-------------------- libgimpwidgets/gimpcolorselection.c | 2 +- libgimpwidgets/gimpcolorselector.c | 190 +++++++++++++++++++++------------- libgimpwidgets/gimpcolorselector.h | 23 +++-- libgimpwidgets/gimpwidgets.def | 5 +- libgimpwidgets/gimpwidgetsenums.c | 12 +-- libgimpwidgets/gimpwidgetsenums.h | 8 +- libgimpwidgets/gimpwidgetsmarshal.list | 3 +- 10 files changed, 403 insertions(+), 303 deletions(-)