Skip to content

Red channel in histogram impossible to see for colourblind people #237

Open

Description

@eduardo-heuvel

When editing an image in Pix using the curves, the rendering of the red channel (when editing separate RGB channels) is nearly impossible to see for me (against the dark gray background). I imagine that (nearly) all other users with the same type of coulourblindness (aprox. 5% of the male population) suffer the same experience. Note: I don't have an exotic form of colourblindness, just the very common red-green colourblindness.
Proposed solution: use a brighter tone of red that stands out against the dark gray background of the histogram.

Activity

  1. darkowlzz commented on Apr 9, 2026

    @darkowlzz
    Contributor

    NOTE: Ignore this comment. This was a misunderstanding. The issue is about the color curve editor histogram and this comment is about the histogram under the image properties. See the other comments below.


    Hi, I just came across this issue and looked around the code and found the locations to change the colors. I don't have much experience with accessibility design and if there's any specific design guideline followed by pix. But since I played around with the code a bit, I thought I would share a few things. It may help anyone else who may know better how to address the issue.

    The histogram's background color is set in a CSS file, see

    background-color: #333333;
    .

    The red channel color is set in

    cairo_set_source_rgba (cr, 0.68, 0.18, 0.19, 1.0); /* #af2e31 */
    .

    Looking at the git history, I see that it used to be (1, 0, 0), ignoring the alpha value, at some point. But then there was an update to what we have today with a lot of other changes. I'm unable to find the context to determine how the new value was determined.

    Regardless, just to get some feedback around what kind of change would be preferable, following are a few images I took with color changes. It would be helpful to know what change is better to help steer towards a good value.

    Without any change, the histogram colors appear:

    Image

    Increasing the red in the red channel by 0.10:

    Image

    Increasing all red, blue and greed in the red channel by 0.10:

    Image

    Reverting to the default channel colors and making the background color lighter:

    Image

    I'm curious to know if changing the background color makes it any better.

    I can help submit the code change once we get some feedback from the project maintainers as well.

  2. eduardo-heuvel commented on Apr 11, 2026

    @eduardo-heuvel
    Author

    Hi, thanks for diving into this, but I think we are talking about two different histograms. Looking at your attached proposals, seeing all three channels in a single histogram suggests they are from the Image Properties tab rather than the Histogram Editing tool. (In Pix, I can easily distinguish the channels in the Properties tab).
    ​The problem occurs specifically when editing the histogram. As someone who is color blind, I find the current UI choices particularly challenging. I used a color picker to analyze the display, and these are the HTML values:
    ​Background: #333333
    ​Red Histogram: #4c3233 (very dark/unsaturated)
    ​Red Curve: #a22e30
    ​Green Histogram: #3a5138
    ​Green Curve: #50b44a
    ​Blue Histogram: #304552
    ​Blue Curve: #237fba
    ​Technical Suggestion regarding Accessibility (WCAG):
    I noticed that the contrast ratio between the background (#333333) and the Red Histogram (#4c3233) is approximately 1.2:1. For meaningful UI elements, the WCAG 2.1 guidelines generally recommend a minimum contrast ratio of 3:1 for graphics and 4.5:1 for text to ensure readability for all users, including those with visual impairments.
    ​The color scheme from the Properties tab works well for me. I hope this can be resolved soon.

  3. darkowlzz commented on Apr 11, 2026

    @darkowlzz
    Contributor

    Thanks for correcting me. Now that I read the issue description again, I see that you mentioned editing using curves.
    I'll spend some more time looking at the history of the code later and also researching about the accessibility details you shared. But at a quick glance, I just noticed that the issue could be more due to transparency/alpha value. For some reason, the transparency is set to 0.20

    #define HISTOGRAM_TRANSPARENCY 0.20

    This results in faded color, which is even a little hard for me to see for long:

    Image

    I just raised it to .80 and that made it so much better:

    Image

    If it was just due the transparency/alpha, maybe we don't need to change the colors. It need not be .80, but any reasonable higher value could work. In the properties histogram the alpha value is set to 1.0. I'm not sure why it is set to a low value here. But maybe the information about the minimum contrast ratio could be a good reason to change it.

    Does the second image looks good for you too?

  4. eduardo-heuvel commented on Apr 11, 2026

    @eduardo-heuvel
    Author

    Thank you for your quick response. The second image definitely looks better to me. Although I would say this value of 0.80 for me (and other colourblind people) is the absolute minimum. Why not choose 0.90?

  5. eduardo-heuvel commented on Apr 11, 2026

    @eduardo-heuvel
    Author

    By the way if this change is implemented, I think that also the brightness and/or opacity of the curve-lines should be increased, otherwise they're likely to get hard to see against the histogram background (especially in logarithmic view as the histogram easily occupies most of the surface of the graph-window).

  6. darkowlzz commented on Apr 13, 2026

    @darkowlzz
    Contributor

    By the way if this change is implemented, I think that also the brightness and/or opacity of the curve-lines should be increased, otherwise they're likely to get hard to see against the histogram background (especially in logarithmic view as the histogram easily occupies most of the surface of the graph-window).

    This is exactly what I observed. I set the transparency/alpha value mentioned above to 1.0 and checked the logarithmic histogram, it's difficult to see. Both the histogram and the curves have the same alpha.

    Image

    One approach to address this could be to have the transparency of the curve and the histogram at different levels. Setting the histogram alpha to 0.5 and the curve to 1.0, the result is a little better

    Image

    But I'm not sure if the contract between the background and the histogram is enough. Also, in this case, I have set the alpha value of all the curves to 1.0. I think the current channel's curve should be brighter than the other channel curves, ideally. This is just for testing and understanding how the appearance changes.

    I don't have much experience with photograph applications to know how others do it but I had a look at what GIMP does.

    Image

    The histogram itself is not colored the same as the channel. Only the curve is colored with the channel color. I think that's a better approach over the drawing the curve over the histogram of the same color. And compared to the last pix image, the curves look closer to GIMP's. GIMP's colors seem to be a little more bright, and maybe the background color also helps to provide extra contrast. And maybe white grids could also be useful.

    Trying the same in pix, setting the histogram color to the color of the Value channel in order to have all the histograms be of the same color and only the curves to have the channel color.

    Image

    I believe this seems to be a better approach to avoid drawing the curve of the same color as the histogram. I think it would be okay for the color curve editor to not have colored histograms but the other histograms in pix to be fully colored as we already do.
    I think a lot more could be done to increase the overall contrasts. But I would like to know if coloring only the curve seems better or different alpha levels of histogram and curve is also fine, it'll be a small change in design compared to setting the same color to all the channel histograms. We would still need some feedback from the maintainers, but still, user feedback on these different approaches would be helpful to arrive at the final design.

  7. eduardo-heuvel commented on Apr 13, 2026

    @eduardo-heuvel
    Author

    Another option is to make the curves white and leave the histogram areas in the channel colour with an alpha of 0.80 or bigger.

  8. darkowlzz commented on Apr 13, 2026

    @darkowlzz
    Contributor

    Another option is to make the curves white and leave the histogram areas in the channel colour with an alpha of 0.80 or bigger.

    If I understand what you mean correctly, I'm not sure how that would work. It may work for edits to a single channel. But as is seen in the images I shared, when you alter the curve in multiple channels, the curves of the other channels remain on the screen in their color. For example, if the red and green curves are altered, and the curves are white, when the current channel is blue, both the red and green curves will appear the same, indistinguishable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions