Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I play Sudoku on my laptop but I find that the white color of the blank squares that we have to fill is hurtful to my eyes. I would like to change the color to something less white, say #777777.

I have tried to edit gtk.css, gtk-widgets.css, and settings.ini in my Ambiance theme to no avail. I assume that Sudoku is gtk3.

I do not know programming but I don't mind editing text files if that will solve my issue. So, if the solution doesn't require editing source code, I'll be grateful for any guidance.

share|improve this question

1 Answer 1

up vote 0 down vote accepted
+100

Unfortunately, you can not change the color with ~/.config/gtk-3.0/gtk.css, or any other easy way, as you could in other widgets. If you need, you must change the source code like this:

--- /usr/lib/python2.7/dist-packages/gnome_sudoku/number_box.py~        2012-08-14 19:45:16.000000000 +0900
+++ /usr/lib/python2.7/dist-packages/gnome_sudoku/number_box.py 2012-08-14 19:41:41.000000000 +0900
@@ -571,7 +571,7 @@
             #    self.style.base[self.state]
             #    )
             #Gdk.cairo_set_source_rgba(
-            cr.set_source_rgb(1.0, 1.0, 1.0)
+            cr.set_source_rgb(0.9, 0.9, 0.9)
         cr.rectangle(
             0, 0, w, h,
             )

Note that:

  • you can control the color with three values representing RGB; the sample diff above is changing 1.0s to 0.9s.
  • This sample diff is for python 2.7. If you are using python3 as your default python, change the directory, accordingly.
  • If you upgrade your gnome-sudoku package, it will revert the change.
  • The reason you can not control them with gtk.css is that they are GtkDrawingAreas with the custom drawing method and literal rgb value (shown in the above diff).

Hope this helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.