Dimming doesn't work on RGB or app-set colors

Bug #1518111 reported by Egmont Koblinger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Undecided
Unassigned

Bug Description

Dimming doesn't work on direct RGB colors, or on palette colors whose values were modified via escape sequences.

Not sure if it could be implemented without help from vte: https://bugzilla.gnome.org/show_bug.cgi?id=758368

Related branches

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Actually, dimming doesn't even work for the 256-color palette, even though this could easily work, and would be more useful in real life. 256 colors are used quite frequently nowadays, whereas it's rare for an app to redefine colors, and true color is also rare.

There's no way to query vte's colors, but there is a way to set them. And all terminal emulators seem to agree on the exact RGB values of these colors (entries 16 thru 255 of the palette), so they are unlikely to ever change. Terminator would need to copy these color values (actually it's a simple formula), apply the dimming to them, and always pass the entire 256-entry palette to vte.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Tricky. In theory I guess an overlay (like used for the terminal drag overlay and in the gtk3 version the recreated visual flash) could be used. I suspect the performance might be a problem though. It's not obvious what additional impact drawing transparent overlays every refresh/draw call would cause.

Your suggestion in the bugzilla about an API settable global dimming value would be much better, if it was accepted.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Sorry, my comment was to the original issue, not the followup comment. So the 256-complete palette dimming would be doable, but is that worth spending time on if a more generic solution (overlay or VTE API) is considered a better approach?

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

I haven't thought of the performance penalty issue of an overlay. I don't even know if it's implementable.

(On a side note, now that we no longer have background texture support, I was wondering if this could also be worked around with transparency + another widget behind, or if not, then by placing another X window underneath :) hack hack hack...)

For the 256-color palette: it's up to you and it's the easiest the implement of all.

For dimming: I guess it's up to me to implement, and up to Christian not to veto the feature. I'm not sure when I'll get to that, there's too much on my todo list.

Also, if you do it, it'll be part of Terminator immediately and there's a good chance to make it to Xenial LTS.

If I do it, you'll have to wait for new vte to be released, in Ubuntu it's YY the earliest that will include that, plus you'd have to carry conditional code to branch on the old vs new way of dimming...

I'd like to softly push you towards implementing the 256-color stuff now, and come back to the rest at some distant point in the future :)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Not sure if you received a mail regarding my response in #1375054 where I mention that I have done pretty much exactly what you describe regarding backgrounds.

OK, consider me gently nudged :-)

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

(I didn't receive that, I _loathe_ on launchpad that I don't automatically subscibe if I comment.)

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

It seems to me that now you have the Gtk+ knowledge to quickly implement a black+alpha overlay. If you do that, we can easily test if it has a noticeable performance penalty. (I don't think so since vte plays nice and updates its screen at around 40 FPS, not every single time its contents change. Drawing is an expensive operation to begin with, applying a filter in front of it is probably much cheaper.)

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

So this is the low hanging fruit implementation for dimming the entire standard 256 color palette.

No sign of dimming RGB yet.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Note that currently terminator dims the palette and the default foreground color, but not the default background. So, with non-black backgrounds, applying an alpha filter on top of the widget would result in a different look.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Forget the previous one, it had a stupid leftover change.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

In rev 1689 for trunk if applicable.
In rev 1627 for gtk3 if applicable.

Changed in terminator:
status: New → Fix Committed
Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.