LWN.net Logo

colours

colours

Posted May 11, 2004 6:54 UTC (Tue) by jamesh (subscriber, #1159)
In reply to: Living Down to a Low Standard (ComputerWorld) by rfunk
Parent article: Living Down to a Low Standard (ComputerWorld)

I'm appalled by the way Gtk2 has ruined Gtk-based apps (and the way colors can no longer be set separately from themes), and I actually like being able to configure things.

Could you ellaborate on this? GTK 2 doesn't really impose much more policy than GTK 1.2 with respect to colours. An app can still load additional rc files, or set the colours on an individual widget (which is actually easier to do now, using gtk_widget_modify_fg and gtk_widget_modify_bg).

It is true that most GTK2 apps don't provide as many preferences to customise random colours in the UI, but this isn't due to limitations in GTK. When you change the foreground or background of a widget, you will often make the text unreadable for at least one theme. Often, it will break with one of the accessibility themes (eg. high contrast inverse). Even if you set both the background and foreground, you may end up making the text unreadable for some users, since they may have special requirements (eg. some people can't read text that has high contrast with its background).

By following using the default colours and fonts, you avoid all these problems. Not only does the app fit in better with the desktop, but it is also more likely to work out of the box for people with disabilities. You will find that the W3C makes similar recommendations to website designers.


(Log in to post comments)

colours

Posted May 11, 2004 17:28 UTC (Tue) by rfunk (subscriber, #4054) [Link]

Could you ellaborate on this? GTK 2 doesn't really impose much more policy than GTK 1.2 with respect to colours.

Well, I first noticed this while using KDE and running Gtk apps. KDE has color themes separate from widget themes, and can extend the color theme to non-KDE apps. With traditional Xt programs, it sets X resources to do this. With Gtk 1.x programs, it uses .gtkrc to do this. With Gtk 2.x programs, it can't, because Gtk 2.x combines the colors with the themes.

That means if I pick a theme whose widgets fit with the rest of my desktop, its colors might totally clash. If I pick a theme whose colors fit, the widgets might look totally wrong.

It is true that most GTK2 apps don't provide as many preferences to customise random colours in the UI, but this isn't due to limitations in GTK. When you change the foreground or background of a widget, you will often make the text unreadable for at least one theme.

See, this is one thing that Petreley got right. WHY NOT TRUST USERS TO SET THEIR OWN COLORS?! The user can see for herself whether it's unreadable or not!

Anyway, if you set colors completely separate from themes, then you WON'T make anything "unreadable for at least one theme", because themes aren't setting colors anymore.

Not only does the app fit in better with the desktop,

Remember, at this point we're talking about Gtk2, NOT Gnome as a whole. That means the toolkit has NO IDEA what the rest of the desktop looks like. The user could be running any window manager or desktop environment -- fvwm, icewm, windowmaker, XFCE, KDE. If I want to theme my Gtk apps so their general look fits in better with MY desktop, I also want to be able to control the colors for the same reason.

If it were Gnome libraries putting on these restrictions, I wouldn't mind, but Gnome isn't the only user of Gtk.

but it is also more likely to work out of the box for people with disabilities.

I'm not talking about out of the box. I'm talking about the user being able to change what comes out of the box for their own purposes.

You will find that the W3C makes similar recommendations to website designers.

The W3C recommends that whatever web designers do, users be able to override color and font settings. Users are supposed to have the final say.

colours

Posted May 12, 2004 1:23 UTC (Wed) by jamesh (subscriber, #1159) [Link]

Well, I first noticed this while using KDE and running Gtk apps. KDE has color themes separate from widget themes, and can extend the color theme to non-KDE apps. With traditional Xt programs, it sets X resources to do this. With Gtk 1.x programs, it uses .gtkrc to do this. With Gtk 2.x programs, it can't, because Gtk 2.x combines the colors with the themes.

Have you considered that this might be a bug in KDE's colour theme control panel? Both GTK 1.2 and 2.x mix colour settings and theme settings in the gtkrc file, so there is no reason why it couldn't work.

See, this is one thing that Petreley got right. WHY NOT TRUST USERS TO SET THEIR OWN COLORS?! The user can see for herself whether it's unreadable or not!

I think I misunderstodd your previous post. I have nothing against users customising the colours of their UI (it is one of the things that still needs to be implemented for Gnome).

Back in the 1.x days, many apps used non-theme colours for various bits of their user interface. Usually they would have a section of their preferences where the user could change these colours. However, if the user had chosen a different theme (such as one of the accessibility themes), these bits of the UI might intially be invisible. The user might not even realise that they were missing out on something until they looked at the preferences. This is bad, and should be avoided.

The right way to allow the user to customise the colours is to create a new theme. Since most Gnome apps don't override the theme colours anymore, the entire desktop would take on the new colour scheme put together by the user. This is a much better situation than the old days where they would then have to play with the colour settings in many applications after changing the theme in order to get a usable desktop.

colours

Posted May 12, 2004 17:00 UTC (Wed) by rfunk (subscriber, #4054) [Link]

Have you considered that this might be a bug in KDE's colour theme control panel?

Well, first it broke when Gtk changed, not when KDE changed, and second non-KDE users are complaining about not being able to change Gnome colors. That tells me it's not a problem with KDE.

Back in the 1.x days, many apps used non-theme colours for various bits of their user interface. Usually they would have a section of their preferences where the user could change these colours.

I think we can agree that sticking color preferences inside apps is a bad thing.

The right way to allow the user to customise the colours is to create a new theme.

That's horrible! Why should someone have to go to that much effort just because they like the look of an existing theme except for its colors?

colours

Posted May 12, 2004 17:24 UTC (Wed) by sri (guest, #2077) [Link]

>That's horrible! Why should someone have to go to that much effort just >because they like the look of an existing theme except for its colors?

A new theme is automatically created as soon as you change a parameter in the theme you're using. There is no extra work. The new theme doesn't even require a name.

sri

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds