Highlight color bugs

@cgrunenberg When using custom colors for highlighting, I noticed some weird behavior, outlined below.

My highlighting colors are adapted to Preview’s colors for higher consistency between apps. That’s why I use the following setup in DEVONthink:

Red
FC5C88

Green
7CC868

Blue
69B0F2

Yellow
FACD5A

Purple
C885DA

The color values were picked with Color Slurp app (because they are correct and give the same highlight color result in Preview) and not with the Mac integrated color picker (because they are not correct and look different in Preview).

Now, when highlighting in DEVON, DEVON displays the color differently at first:

After closing that window and reopening the file within DEVON, it changes to the correct color value, FC5C88 in this case, as set in DEVON’s preferences:

Reopening a PDF and making some new highlights showcases that difference (first 3 lines are the correct color after reopening and lines 4–6 are the wrong color after adding more highlights and not having closed and reopened the PDF yet):

Opening this PDF in other apps tells us more. The side by side comparison shows Preview, PDF Viewer, PDF Expert and Highlights.

It can be seen that PDF Viewer (second from left) shows the same issue of 2 different colors, with line 4–6 being wrong (difference tested with color picker):

While closing and reopening the file in DEVON corrects the issue and the tested PDF apps (except PDF Viewer) can display the PDF file with the correct color instantly (irrespective of having closed and reopened the file within DEVON), PDF Viewer has some more peculiarities.

No matter what I do in DEVON, opening the PDF in PDF Viewer always keeps the last highlight in an incorrect color state. The following image shows lines 4–6 incorrectly. Having closed and reopened the PDF in DEVON doesn’t matter. Closing and reopening in PDF Viewer also doesn’t make a difference. Also notice the difference in highlight style rounding from line 4:

Now, adding a highlight in DEVON and then opening the file in PDF Viewer, fixes lines 4–6 in PDF Viewer, while line 7 (the last added highlight in DEVON) is now incorrect in PDF Viewer:

It doesn’t matter how the file is edited in DEVON, I can also use another color (yellow in the following image) or underline, the latest change in DEVON (yellow highlight) fixes the second last change (line 7) in PDF Viewer and keeps the last change (yellow highlight) in an incorrect state in PDF Viewer:

This applies to all colors, not just red.

Given that all other PDF apps I use don’t have that issue, it seems that DEVON uses the PDF engine provided by PDF Viewer, with a similar buggy highlighting behavior.

I’m ok with DEVON having the correct color after closing a file, but the last change fixes second last change behavior in PDF Viewer is wild.

1 Like

The highlighted text is currently also selected (what’s the default selection color on your system?), deselecting the text or selecting any other text should be sufficient to get the expected colors.

No, that’s incorrect. No text was selected in any of the screenshots at all.

Did you add the highlights in Preview or DEVONthink? In the second case a text selection is required first.

DEVONthink.

Yes, text was selected first, then highlighted. But I didn’t have text selected while taking the screenshots.

I don’t think the problem is understood and I’ll try to add additional info…

I re-read everything and I’m not sure what else I could say, the info posted is correct.

Custom highlight colors are only correct after reopening a file. This doesn’t apply to the default colors.

I can add a video that showcases this below.

Use any custom color, like FC5C88 for Red.

Highlight text and check the color with ColorSlurp.

See that the color is not FC5C88 as set in the preferences, but a different shade, FF769A.

Close the PDF and reopen it. See that the color now is correct, FC5C88.

Make a new highlight and easily spot the difference between the newly added highlight color and the one that was added before (which was corrected by closing the PDF in the prior step).

https://p179.p0.n0.cdn.getcloudapp.com/items/L1udgAe6/3728d4a6-65bb-4572-a368-c32cdf81f757.mov

Which version of macOS do you use?

mac

Since PDF Viewer shows even wilder behavior as mentioned in the first post, this might be an PSPDFKit issue that made it into DT?

In any case, does the video I posted make it easier to see the problem? I can reproduce this with any custom color.

DEVONthink uses the PDFkit framework of macOS which also draws the highlights. Maybe it’s another of the many glitches of this framework (as DEVONthink doesn’t modify the chosen colors in any way).

I see. I just thought that it might be related, because only PDF Viewer shows similar weird behavior like that, whereas Preview, PDF Expert and Highlights don’t and display the color correctly.

As long as closing the file changes it into the right color, I can live with that.