Inkscape.org
Beyond the Basics Switching the color selector to 0-255 scale
  1. #1
    waffle waffle @waffle

    Hi,

    Is there any way to switch the color selector to 0-255 scale?

    I know that Inkscape moved to 0-100% scale a while ago, but I find it a bit frustrating to use. Alpha channel is 8 bit and some values cannot be set using the color selector slider, and vice versa - two different alpha values may correspond to the same position on the slider.

    Same applies to the saturation and lightness sliders: I can't set the color to #818181 by just moving the L slider to 129. Instead, I need to enter the HEX value manually or open the RGB tab and set each channel to 129.

    Is building a modified version of Inkscape the only solution?

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    I'd file a feature request to make slider units determined by users. 

  3. #3
    Polygon Polygon @Polygon🌶

    0-255 are RBG values - no? And still available unless I missed your point:

    I´d say every image editor uses %Opacity I know off - incl. GIMP, Krita, AffinitySuite, VectorStyler, ClipStudioPaint etc.

  4. #4
    waffle waffle @waffle
    TylerDurden

    I'd file a feature request to make slider units determined by users.

    Thanks, just wanted to make sure I'm not missing something.

    Polygon

    0-255 are RBG values - no?

    Yes. The alpha slider, however, is not 0-255, despite being the same 8-bit value as RGB. Other sliders, such as saturation, lightness, value are also not 0-255.

    Polygon

    I´d say every image editor uses %Opacity I know off

    I think opacity should stay 0-100%. I'm only talking about the alpha channel of the color.

  5. #5
    Polygon Polygon @Polygon🌶

    The Alpha slider is for Opacity and though in % like in every other image editing software I know of.

    waffle

    I'm only talking about the alpha channel of the color.

    Seems I missed your point then unfortunately...

  6. #6
    waffle waffle @waffle
    Polygon

    The Alpha slider is for Opacity and though in % like in every other image editing software I know of.

    By opacity I meant the slider that sets the opacity of the whole object. It should be in %.

    By the alpha slider I meant the one marked "A:" or "Alpha (opacity)" in the hint. It controls the A component of the RGBA color of fill, stroke, gradient stop etc. It is an 8 bit value and it makes sense to have the range of 0-255 for it's slider.

    BTW I tried the VectorStyler out of curiosity and it seems to work with RGB colors, not RGBA. Also, their color picker is absolutely broken:

  7. #7
    Polygon Polygon @Polygon🌶

    I still don´t get it: From Inkscape´s XML editor:

     

  8. #8
    waffle waffle @waffle

    You got it, that's alpha value of the fill color. Here it is in the UI:

     

  9. #9
    Darren Hawkshaw Darren Hawkshaw @dhawkshaw

    Hi @waffle,

    @Polygon highlights this quite well. In the SVG spec, the full colour is specified and stored as RGB + Opacity, with opacity defined as a float between 0 and 1. Even in general web semantics, the RGBA() function takes the alpha channel as a float between 0 and 1. The only place that the alpha channel is represented as a pure 8 bit value is when the full RGBA colour is represented in hex notation.

    If you alter the hex value manually, you will notice the alpha channel is still stored as a float under the fill or stroke opacity style attribute. If you alter a fill attribute directly in the XML editor and feed it a full RGBA hex value, inkscape will render it as undefined.

    Cheers.

  10. #10
    waffle waffle @waffle

    Hi @dhawkshaw,

    Yes, I'm aware that opacity is stored as a float. The slider in the UI, though, is an integer value between 0 and 100. Adding a decimal part to the alpha slider (like in GIMP, for example) would partially solve the issue. However, I would much prefer an (optional) 0-255 scale that matches the hex value.

    I remember that the old 0.9x versions used that scale so I wanted to ask if there's still a way to enable the old behavior and Tyler already gave me a sufficient answer.

  11. #11
    Tyler Durden Tyler Durden @TylerDurden

    Ja, I see it as a UI/UX preference thing. Inkscape is gonna write whatever it wants into the xml.

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Switching the color selector to 0-255 scale