2 Replies
      Latest reply on Feb 9, 2019 7:05 PM by nsb
      Lawrence Graham Level 1 Level 1 (0 points)

        Steps to Reproduce


        1. Create a new a Cocoa app and add an NSTextView (with or without NSScrollView/NSClipView) instance to the content view.
        2. Set the background color of the text view to [NSColor whiteColor]
        3. Use Digital Color Meter to inspect the text view's background color


        Expected Result


        The text view's background should be white.


        Actual Result


        Inspecting the text view's background using the Digital Color Meter app reveals that the background is a mixture of white RGB: 255, 255, 255 pixels, RGB: 254, 255, 255, RGB: 255, 254, 255 and RGB: 255, 255, 254 values.

        • Re: NSTextView background color issue
          Claude31 Level 8 Level 8 (9,205 points)

          I tested with Digital Color meter and I get 255 everywhere.(OSX 10.14.3)


          It does not appear to be a major issue.Noone will ever be able to see the difference. But from a computer program perspective, I imagine that could create problem if you are comparing colors.

          Did you test with other colors like 128,128,128

          Could it be a problem in ColorMeter ?

          • Re: NSTextView background color issue
            nsb Level 1 Level 1 (0 points)

            I confirm the issue with Digital Color Meter and another pixel color sampler. I suspect the problem is with the samplers and their math. If you take a screenshot of a TextView and flood-fill it in an image editor the whole view fills (there are no off-pixels that stick out).