17

I'm studying a lot on screen because of the Covid19 pandemic. And it tears my eyes apart.

brieucdug@msi:~$ lsb_release -d && uname -r
Description:    Ubuntu 20.04 LTS
5.4.0-37-generic

(gnome-shell)


Resume

I've set the dark mode on, but it inverts image as well on a greyscale. I do not want that. I've set my Okular setting like that (Background : Dark Grey / Font : White)

okular-setting

sample

What I'm looking for

Right now, I've set a shortcut to toggle colors.

However, what I'd love, your guess, is that :

result-want


What I found

I found these two files

/usr/share/config.kcfg/okular.kcfg
/usr/share/config.kcfg/okular_core.kcfg

With, respectively,

brieucdug@msi:~$ cat /usr/share/config.kcfg/okular.kcfg
...
<group name="Dlg Accessibility" >
  <entry key="HighlightImages" type="Bool" >
   <default>false</default>
  </entry>
  <entry key="HighlightLinks" type="Bool" >
   <default>false</default>
  </entry>
  <entry key="RecolorForeground" type="Color" >
   <default code="true" >0x600000</default>
  </entry>
  <entry key="RecolorBackground" type="Color" >
   <default code="true" >0xF0F0F0</default>
  </entry>
  <entry key="BWThreshold" type="UInt" >
   <default>127</default>
   <min>2</min>
   <max>253</max>
  </entry>
  <entry key="BWContrast" type="UInt" >
   <default>2</default>
   <min>2</min>
   <max>6</max>
  </entry>
 </group>
...
brieucdug@msi:~$ cat /usr/share/config.kcfg/okular_core.kcfg
...
<group name="Document">
  <entry key="PaperColor" type="Color" >
   <default code="true" >Qt::white</default>
  </entry>
  <entry key="ChangeColors" type="Bool" >
   <default>false</default>
  </entry>
  <entry key="RenderMode" type="Enum" >
   <default>Inverted</default>
   <choices>
    <choice name="Inverted" />
    <choice name="Paper" />
    <choice name="Recolor" />
    <choice name="BlackWhite" />
   </choices>
  </entry>
 </group>
...

In the first file okular.kcfg, there is no mention about the pictures.

In the second one okular_core.kcfg, however, I thought I touch something with <choice name="Inverted" />, but nothing (I didn't tried to reboot, tho).


So, if anyone know how I could fin a workaround to get it to work as I want, I'm all ears ! :-)

Thank you, Brieuc.

PS : Sorry for these teeth pictures, hope you won't have any nightmare. Edit :

B. du Garay
  • 271
  • 2
  • 6
  • There is also way to create simple switch, to change colors, when you need. You can add button into the tools panel with function "toggle color change". Which will use your specified settings. (I did it just now) https://www.reddit.com/r/kde/comments/6bttn1/shortcut_on_okular_toolbar_for_change_colors_or/dhpipca/ I was originaly looking for the solution to highlighting, which behaviors weirdly when colors are inverted, so if somebody have another tip, it would be welcome with me. :) – jirimertin May 06 '21 at 18:24
  • 1
    Well. That's how I have done. But not having to toggle would be better – B. du Garay May 07 '21 at 17:15
  • Is the 'change paper color' option in the 'color mode' drop-down menu supposed to what it implies? I tried black for a white PDF, no discernible difference. – user198350 May 18 '22 at 11:43

1 Answers1

1

Let's look on it, or how we would say in Czechia "We'll look at the tooth of it" :)

Best what you can accomplish by Okular is this enter image description here (The black zone doesn't include text, i didnt put it there, but its inverted)

You can do this by

Accessibility > Change Colors > Color Mode > Invert the brightness (its translated)

So you were close. :)

jirimertin
  • 111
  • 3
  • 1
    It's great ! While a little bit too contrasted, and I can't see what I'd be looking for (gingival odeamatia).. I'll look into that, thank you – B. du Garay May 07 '21 at 17:17