{"id":35501,"date":"2021-11-02T14:11:59","date_gmt":"2021-11-02T14:11:59","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=35501"},"modified":"2021-11-02T14:11:59","modified_gmt":"2021-11-02T14:11:59","slug":"check-contrast-colors-ubuntu-kontrast","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/11\/check-contrast-colors-ubuntu-kontrast\/","title":{"rendered":"Check Contrast between Two Colors in Ubuntu Linux via Kontrast"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-icon.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-icon-250x250.png\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-35502\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-icon-250x250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-icon-300x300.png 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-icon-600x600.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-icon-768x768.png 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-icon.png 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>For designers want to check color contrast, there are a few handy little tools in Linux Desktop to do the job. Kontrast is the one designed for KDE though works on all Linux desktops.<\/p>\n<p>GNOME has a <a href=\"https:\/\/apps.gnome.org\/app\/org.gnome.design.Contrast\/\" rel=\"noopener\" target=\"_blank\">stylish color contrast tool<\/a>. Though it&#8217;s now in early stage which does not work well and freezes often at least in my case. Here I&#8217;ll introduce the KDE&#8217;s Kontrast.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-app.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-app-600x423.jpg\" alt=\"\" width=\"600\" height=\"423\" class=\"aligncenter size-large wp-image-35503\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-app-600x423.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-app-300x211.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-app-768x541.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/kontrast-app.jpg 937w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>This little app displays <i>font color for text<\/i> and <i>another color as background<\/i>. Users may change the font and background colors by:<\/p>\n<ul>\n<li><b>manually input a color value.<\/b><\/li>\n<li><b>use built-in color picker.<\/b><\/li>\n<li><b>drag slider bar to change hue, saturation, and lightness.<\/b><\/li>\n<li>or use &#8220;<b>Randomize<\/b>&#8221; button to generate a pair of colors.<\/li>\n<\/ul>\n<p>For each color combination, it displays the contrast ratio, and readability (&#8220;Perfect&#8221;, &#8220;Good&#8221;, or &#8220;Bad&#8221;) for normal and large text. There&#8217;s also &#8220;Invert&#8221; button to reverse the two colors. As you can see, it allows to mark color as favorite, though it somehow always fail in my case.<\/p>\n<h3>How to Install Kontrast in Ubuntu via apt:<\/h3>\n<p>For <b>Ubuntu 21.04<\/b> and <b>Ubuntu 21.10<\/b>, this handy tool has been made into official Ubuntu repositories. Simply press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal and run command to install it:<\/p>\n<pre>sudo apt install kontrast<\/pre>\n<p>Though for non-KDE desktop, there will be a lot of dependency libraries also to be installed.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/apt-kontrast.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/apt-kontrast.png\" alt=\"\" width=\"600\" height=\"271\" class=\"aligncenter size-full wp-image-35504\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/apt-kontrast.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/apt-kontrast-300x136.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Install Kontrast in Ubuntu 20.04 and older versions:<\/h3>\n<p><b>Ubuntu 20.04<\/b>, <b>Ubuntu 18.04<\/b>, and even <b>Ubuntu 16.04<\/b> users may install the latest version using the Linux universal <a href=\"https:\/\/flathub.org\/apps\/details\/org.kde.kontrast\" rel=\"noopener\" target=\"_blank\">flatpak package<\/a>.<\/p>\n<p>1.) Firstly, press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal. Then run command to install the flatpak daemon:<\/p>\n<pre>sudo apt install flatpak<\/pre>\n<p>Ubuntu 18.04 and 16.04 need to add this <a href=\"https:\/\/launchpad.net\/~flatpak\/+archive\/ubuntu\/stable\" rel=\"noopener\" target=\"_blank\">stable PPA<\/a> first.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/apt-flatpak.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/apt-flatpak-600x102.jpg\" alt=\"\" width=\"600\" height=\"102\" class=\"aligncenter size-large wp-image-10296\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/apt-flatpak-600x102.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/apt-flatpak-450x77.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/apt-flatpak.jpg 705w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>2.) Next, add the flathub repository that hosts the package:<\/p>\n<pre>flatpak remote-add --if-not-exists flathub https:\/\/flathub.org\/repo\/flathub.flatpakrepo<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/flathub-focal.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/flathub-focal-600x100.jpg\" alt=\"\" width=\"600\" height=\"100\" class=\"aligncenter size-large wp-image-10285\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/flathub-focal-600x100.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/flathub-focal-450x75.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/flathub-focal.jpg 748w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>3.) Finally install the color contrast checker app via command:<\/p>\n<pre>flatpak install flathub org.kde.kontrast<\/pre>\n<p>For first time installing KDE app as flatpak, there are almost 800 MB run-time libraries to be installed:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/flatpak-kontrast.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/flatpak-kontrast.png\" alt=\"\" width=\"600\" height=\"403\" class=\"aligncenter size-full wp-image-35506\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/flatpak-kontrast.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/flatpak-kontrast-300x202.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Once installed, search for and open the tool from activities overview screen and enjoy!<\/p>\n<h3>How to Remove Kontrast:<\/h3>\n<p>To remove the package installed via apt, use command:<\/p>\n<pre>sudo apt remove --autoremove kontrast<\/pre>\n<p>For the flatpak, use this command instead to remove it:<\/p>\n<pre>flatpak uninstall --delete-data kontrast<\/pre>\n<p>And run <code>flatpak uninstall --unused<\/code> command will delete the unused run-time libraries.<\/p>","protected":false},"excerpt":{"rendered":"<p>For designers want to check color contrast, there are a few handy little tools in Linux Desktop to do the job. Kontrast is the one designed for KDE though works on all Linux desktops. GNOME has a stylish color contrast tool. Though it&#8217;s now in early stage which does not work well and freezes often [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":35502,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1734],"class_list":["post-35501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-color-picker"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/35501","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=35501"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/35501\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/35502"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=35501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=35501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=35501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}