How can I modify gtk-dialog colours?
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
How can I modify gtk-dialog colours?
Morning, all.
I have a question about something that some of you are perhaps quite familiar with.
I know how to create on-screen "messages", either with pupmessage/gxmessage, or using gtk-dialog. Where these are used, you can set your own foreground (text) & background colours.
I ask because, in all seriousness, the two "flagship" Puppies, brilliant though they are (and obviously taking a lot of work, & TLC, from Phil B.) have, to my mind, just one real niggle:-
Who was it that thought black text on a dark green background was a good idea for system messages??? For those of us with 'poor' eyesight, it's not a good choice.....not at all. I'd like to modify this in my own system, but I need to know one thing; is there a 'global', default setting for this anywhere, or is it, as I suspect, set on an app-by-app basis?
Anybody know where I would look for this? Advice/help, etc, as always, will be much appreciated..!
Mike.
I have a question about something that some of you are perhaps quite familiar with.
I know how to create on-screen "messages", either with pupmessage/gxmessage, or using gtk-dialog. Where these are used, you can set your own foreground (text) & background colours.
I ask because, in all seriousness, the two "flagship" Puppies, brilliant though they are (and obviously taking a lot of work, & TLC, from Phil B.) have, to my mind, just one real niggle:-
Who was it that thought black text on a dark green background was a good idea for system messages??? For those of us with 'poor' eyesight, it's not a good choice.....not at all. I'd like to modify this in my own system, but I need to know one thing; is there a 'global', default setting for this anywhere, or is it, as I suspect, set on an app-by-app basis?
Anybody know where I would look for this? Advice/help, etc, as always, will be much appreciated..!
Mike.
menu->Desktop->JWMDesk Manager->
GTK Theme
JWM Theme
These do anything you are looking for?
What program or terminal are you seeing this?
GTK Theme
JWM Theme
These do anything you are looking for?
I am not sure what you are looking at.Who was it that thought black text on a dark green background was a good idea for system messages???
What program or terminal are you seeing this?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
Morning, bigpup.
No, I'm not talking about a terminal, or an application. I'm talking about like the wee infobar that comes up in the centre of the screen if, for instance, you've done something like mounting an SFS to look at the contents, or an ISO to do the same.
You can't take a screenshot of it, either - I've tried! - because as soon as anything else happens on screen, it disappears.....or times out.
But black text on a dark green background is NOT a good idea for those of us who have eyesight 'issues'..... I would imagine there's a way to do this, I'm just not sure where to look. In the pMount script, perhaps?
Mike.
No, I'm not talking about a terminal, or an application. I'm talking about like the wee infobar that comes up in the centre of the screen if, for instance, you've done something like mounting an SFS to look at the contents, or an ISO to do the same.
You can't take a screenshot of it, either - I've tried! - because as soon as anything else happens on screen, it disappears.....or times out.
But black text on a dark green background is NOT a good idea for those of us who have eyesight 'issues'..... I would imagine there's a way to do this, I'm just not sure where to look. In the pMount script, perhaps?
Mike.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
You mean this one? In newer Puppies this dialog will look a bit different (don't know which "flagships" you are talking about), but AFAIK background color green hasn't changed.
- Attachments
-
- Screenshot.png
- (10.48 KiB) Downloaded 154 times
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
Mm-hm! That's the one, Mochi.MochiMoppel wrote:You mean this one? In newer Puppies this dialog will look a bit different (don't know which "flagships" you are talking about), but AFAIK background color green hasn't changed.
Your picture is exactly how it looked when I used to run some of the older Puppies myself. Since upgrading to new hardware back in January, I can only run relatively modern Puppies, because of the UEFI stuff I'm now stuck with....
By 'flagships' I'm referring to Xenialpup64 & Bionicpup64. I also run radky's DPup 'Stretch' 7.5; these are the only ones I run now.
By messing around with the delay function in Take A Shot!, I've managed to get a snap of it. This is exactly how it appears in both Xenialpup64 and Bionicpup64 on this new hardware; I haven't modified it, enhanced it, or done anything to it:-
Perhaps your eyesight is better than mine (which wouldn't be hard; I think most people's eyes are better than mine..!), but I find that pretty hard to read.
The only way to make it more 'readable' is to hike the gamma/brightness settings up the top of the scale.....but if I do that, the rest of the desktop is so washed-out it's nearly invisible.
Quite simply, I want to change the background colour, that's all. But I don't know where to look. Any advice would be much appreciated; I believe you know a bit more about gtk-dialog than most folks on the Forum...
(*shrug*)
Mike.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Hi Mike, I think the script to edit is /usr/sbin/filemnt (or filemnt in other PATH location perhaps)
Open with geany and search for 'green' and change "-bg green" to another color.
Or change the foreground color (default is black I think) by adding e.g. "-fg yellow" (without the quotes).
Probably hex color codes works too but needs surrounded by (double) quotes e.g.: -bg "#D1D5DA"
Fred
Open with geany and search for 'green' and change "-bg green" to another color.
Or change the foreground color (default is black I think) by adding e.g. "-fg yellow" (without the quotes).
Probably hex color codes works too but needs surrounded by (double) quotes e.g.: -bg "#D1D5DA"
Fred
Last edited by fredx181 on Wed 01 Apr 2020, 14:12, edited 1 time in total.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Ah, yes, that's the lighter green, when specifying -bg green at my gtkdialog splash it shows the darker green: #158916 EDIT: No #008000MochiMoppel wrote:Sure he can do this, but the real question is why the definition of "green" has changed. Should be #00FF00, and this definitely is not dark.fredx181 wrote:Open with geany and search for 'green' and change "-bg green" to another color.
Last edited by fredx181 on Wed 01 Apr 2020, 14:34, edited 2 times in total.
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
Thanks for the replies, guys.
@ Mochi:- If I type "green" into Geany's color chooser, and hit Apply, the hex code I end up with is #008000.....OK? But it's a really dark green, for some reason. If I select a lighter green in the Color chooser - more like the image in your attachment - the code is, of course, completely and totally different.
@ Fred:- O-kay. /usr/bin/filemnt, you say? I'll take a butchers at it..... TBH, I don't really care which approach I take, whether it's leaving the text as-is, and making the background lighter, or leaving the background as-is, and making the text lighter. I would just like to able to read them when they come up.....and for that we need a bit of contrast!
(Before you say it, I know, I know; like you, I've seen the things come up a million times, and know what they say off by heart.....but it's the principle of the thing, y'know? )
Add to which I'm just a fussy bugger where appearances are concerned.....
Mike.
@ Mochi:- If I type "green" into Geany's color chooser, and hit Apply, the hex code I end up with is #008000.....OK? But it's a really dark green, for some reason. If I select a lighter green in the Color chooser - more like the image in your attachment - the code is, of course, completely and totally different.
@ Fred:- O-kay. /usr/bin/filemnt, you say? I'll take a butchers at it..... TBH, I don't really care which approach I take, whether it's leaving the text as-is, and making the background lighter, or leaving the background as-is, and making the text lighter. I would just like to able to read them when they come up.....and for that we need a bit of contrast!
(Before you say it, I know, I know; like you, I've seen the things come up a million times, and know what they say off by heart.....but it's the principle of the thing, y'know? )
Add to which I'm just a fussy bugger where appearances are concerned.....
Mike.
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
Sorry, Fred; I meant /usr/sbin! (It's April Fool's day here in the UK; whadd'ya expect..? )fredx181 wrote:in /usr/sbin on Bionicpup64Mike wrote: /usr/bin/filemnt, you say?
Ya, I see the places that need alteration. I see only 'bg' is mentioned. When I use these myself, I normally specify both 'fg' and 'bg'. I assume that if 'fg' isn't specified, it'll default to black, yes?
And yes; I discovered about the need for quotation marks around hex values a while ago, when I was customizing the appearance of xload in the notification area of my Pups.....I like it about four times the width, different 'graph' colours and updating every 2 seconds. If you don't use quotation marks round the hex values, xload goes very.....'peculiar', that's all I can say!
I'll do some experimenting. Cheers for the pointers.
Mike.
Last edited by Mike Walsh on Wed 01 Apr 2020, 19:19, edited 1 time in total.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Of course not OK.Mike Walsh wrote:@ Mochi:- If I type "green" into Geany's color chooser, and hit Apply, the hex code I end up with is #008000.....OK?
Your flagships are using the W3C color scheme instead of the X11 scheme. That's wrong. I tried to explain this here.
What however is strange is that /usr/share/X11/rgb.txt in Stretch7.5 defines green as "0 255 0 Green", which would be the lighter #00FF00, so why is green rendered as #00800? The flagship captains should know.
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
Interesting, same happens in Fatdog.MochiMoppel wrote:Of course not OK.Mike Walsh wrote:@ Mochi:- If I type "green" into Geany's color chooser, and hit Apply, the hex code I end up with is #008000.....OK?
Your flagships are using the W3C color scheme instead of the X11 scheme. That's wrong. I tried to explain this here.
What however is strange is that /usr/share/X11/rgb.txt in Stretch7.5 defines green as "0 255 0 Green", which would be the lighter #00FF00, so why is green rendered as #00800? The flagship captains should know.
It seems that GTK uses Pango to convert color names to hex values and source shows that Pango has its own RGB definitions:
Code: Select all
# grep 'green$' pango-1.42.4/tools/rgb.txt
0 128 0 green
#
But either something went wrong, or maybe the X11 definitions were different at that time..?commit 633466d81ce094f8aadd562a51d16e150bb4037d
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Sat Aug 25 15:46:21 2012 -0400
Add rgb.txt from X11
tools/Makefile.am | 3 +-
tools/rgb.txt | 753
++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 755 insertions(+), 1 deletion(-)
[EDIT] They changed it deliberately: https://github.com/GNOME/pango/commit/d ... a7aff3112f
Ahoy!
Last edited by SFR on Wed 01 Apr 2020, 20:04, edited 1 time in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Here you go, lines 298 - 326 extracted from /usr/share/rgb.txt (in EasyPup) explains how #008000 is used for green. This differs from /usr/share/X11/rgb.txt, which does not contain these definitions.
Code: Select all
# From HTML 4.0 specification. These are colors you can specify by name
# in HTML tags.
#
# Actually, these are the colors as if HTML's sRGB values were actually
# Rec. 709. E.g. HTML 4.0 says silver is r=192, g=192, b=192, in the
# SRGB system.
# This file, which by definition contains Rec. 709 values, shows the same
# three numbers (192,192,192). So this file defines a slightly different
# color than HTML does.
#
# There's some extension to HTML, apparently not blessed by W3C, that adds
# all the MIT colors (see above). Internet Explorer can render all of them.
000 000 000 Black
192 192 192 Silver
128 128 128 Gray
255 255 255 White
128 000 000 Maroon
255 000 000 Red
128 000 128 Purple
255 000 255 Fuchsia
000 128 000 Green
000 255 000 Lime
128 128 000 Olive
255 255 000 Yellow
000 000 128 Navy
000 000 255 Blue
000 128 128 Teal
000 255 255 Aqua
/usr/sbin/filemnt
I changed mine to yellow background with black font.
There was two different code lines for bg green, that had to be changed.
I changed mine to yellow background with black font.
There was two different code lines for bg green, that had to be changed.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
TBH, I've dialled my own green back & down several shades & degrees of brightness; it's a pale, lemony-green now, more restful on the eyes. The way it was earlier this afternoon, it was more than a little "in yer face"..!bigpup wrote:/usr/sbin/filemnt
I changed mine to yellow background with black font.
There was two different code lines for bg green, that had to be changed.
Mike.