
{"id":34146,"date":"2021-07-10T16:56:01","date_gmt":"2021-07-10T16:56:01","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=34146"},"modified":"2021-07-10T16:56:01","modified_gmt":"2021-07-10T16:56:01","slug":"text-editor-unreadable-ubuntu-dark-mode","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/07\/text-editor-unreadable-ubuntu-dark-mode\/","title":{"rendered":"Active Line in Text Editor Unreadable in Ubuntu 20.04 Dark Mode [Workaround]"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-icon250.png\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-34147\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-icon250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-icon250-150x150.png 150w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>For dark mode fans, you may found the color scheme in Gedit Text Editor is not so good! Focused line is not even readable due to the light text on light line background.<\/p>\n<p>There&#8217;s already an <a href=\"https:\/\/github.com\/ubuntu\/yaru\/pull\/2546\" rel=\"noopener\" target=\"_blank\">upstream fix<\/a>, though it&#8217;s not made into current Ubuntu releases. There are however workarounds and I&#8217;m going to show you how!<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-darkmode.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-darkmode-600x337.jpg\" alt=\"\" width=\"600\" height=\"337\" class=\"aligncenter size-large wp-image-34148\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-darkmode-600x337.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-darkmode-300x169.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-darkmode-768x432.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-darkmode.jpg 953w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Option 1.) Use another color scheme:<\/h3>\n<p>There are a few other built-in color schemes available in the default Gedit text editor. <\/p>\n<p>Firstly, open the editor and go to &#8216;Preferences&#8217; in the hamburger menu. While Ubuntu defaults to the &#8216;Classic&#8217; colors, you can then choose another from <i><b>Font &#038; Colors<\/b><\/i> tab.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-colors.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-colors.jpg\" alt=\"\" width=\"415\" height=\"493\" class=\"aligncenter size-full wp-image-34149\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-colors.jpg 415w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/gedit-colors-253x300.jpg 253w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/a><\/p>\n<p>And new colors take places immediately!<\/p>\n<h3>Option 2.) Hack the current line background color:<\/h3>\n<p>Sticking to the default color scheme? It&#8217;s easy to hack the xml config file to change the current line background.<\/p>\n<p>1.) Firstly, open terminal either from system app launcher or by pressing Ctrl+Alt+T on keyboard.<\/p>\n<p>2.) When terminal opens, run command to edit the xml:<\/p>\n<pre>sudo gedit \/usr\/share\/gtksourceview-4\/styles\/classic.xml<\/pre>\n<p>Type user password (no visual feedback) when it asks and hit Enter. When file opens, scroll down to find out and change the background value of <b>&#8216;current-line&#8217;<\/b> and <b>&#8216;current-line-number&#8217;<\/b>.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/dark-mode-color.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/dark-mode-color-600x254.jpg\" alt=\"\" width=\"600\" height=\"254\" class=\"aligncenter size-large wp-image-34150\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/dark-mode-color-600x254.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/dark-mode-color-300x127.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/dark-mode-color-768x325.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/07\/dark-mode-color.jpg 874w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>NOTE: If you stick to dark mode, color <b>#181818<\/b> is great! However, it&#8217;s not good in light mode. So if you switch between light and dark mode regularly, use another color value, such as <b>#99999c<\/b>.<\/p>\n<p>After saving the changes, the color will take place in new app window. <\/p>","protected":false},"excerpt":{"rendered":"<p>For dark mode fans, you may found the color scheme in Gedit Text Editor is not so good! Focused line is not even readable due to the light text on light line background. There&#8217;s already an upstream fix, though it&#8217;s not made into current Ubuntu releases. There are however workarounds and I&#8217;m going to show [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34148,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[2037],"class_list":["post-34146","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-dark-mode"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=34146"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34146\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/34148"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=34146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=34146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=34146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}