cool-retro-term icon indicating copy to clipboard operation
cool-retro-term copied to clipboard

Light Themes Impractical

Open niedzielski opened this issue 9 years ago • 21 comments

This is a feature request. I was thinking it'd be neat to implement a "light" theme, that is, dark text on a bright background, but I can't seem to get the text dark enough. Maybe I'm missing a setting?

2015-04-20-11-51-55-099546493

It'd be neat to implement the CRT version of Soda Light. I could picture a "Kindle theme" too.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/11611228-light-themes-impractical?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github).

niedzielski avatar Apr 20 '15 17:04 niedzielski

I've added a small bounty in hopes that whomever claims it implements some reasonable light theme example that could be adapted by others.

niedzielski avatar Apr 20 '15 22:04 niedzielski

@niedzielski Here's are a couple of examples of the themes requested. Darker text is primarily a matter of turning the contrast all the way up and finding a reasonable value for the brightness in the "Screen" tab. (When editing a profile.)

Here are some basic JSON themes for your respective examples and screenshots of them.

Fizz-Light (Soda-Light-ish, pretty much just white and black):

{
  "ambientLight": 0,
  "backgroundColor": "#ffffff",
  "bloom": 0,
  "brightness": 0.3992,
  "burnIn": 0.4038,
  "chromaColor": 0,
  "contrast": 1,
  "flickering": 0,
  "fontColor": "#000000",
  "fontName": "EXCELSIOR_SCALED",
  "fontWidth": 1,
  "frameName": "SIMPLE_WHITE_FRAME",
  "glowingLine": 0,
  "horizontalSync": 0,
  "jitter": 0.1867,
  "rasterization": 0,
  "rbgShift": 0,
  "saturationColor": 0,
  "screenCurvature": 0.0976,
  "staticNoise": 0.0668,
  "windowOpacity": 1,
  "name": "Fizz-Light"
}

Screenshot: image

Kindle-ish, based on a Kindle Keyboard 3 in poor lighting:

{
  "ambientLight": 0,
  "backgroundColor": "#d4ddc4",
  "bloom": 0,
  "brightness": 0.3704,
  "burnIn": 0.4038,
  "chromaColor": 0,
  "contrast": 1,
  "flickering": 0,
  "fontColor": "#1e1e1e",
  "fontName": "INCONSOLATA",
  "fontWidth": 1,
  "frameName": "NO_FRAME",
  "glowingLine": 0,
  "horizontalSync": 0,
  "jitter": 0,
  "rasterization": 0,
  "rbgShift": 0,
  "saturationColor": 0,
  "screenCurvature": 0,
  "staticNoise": 0,
  "windowOpacity": 1,
  "name": "Kindle-ish"
}

Screenshot: image

Hope these help! Do you know of the location where the default themes are hosted? They do not appear to be kept in this repository.

Also, $100 is a "small" bounty? Perhaps you meant $1 or $10? O_o

JoshTheDerf avatar Apr 23 '15 06:04 JoshTheDerf

@niedzielski @Tribex Sorry for the late response, and thank you for the "not so small" bounty :D . Anyway the problem with colours is simple: there is currently no way to change the scheme. In practice, the terminal is always drawn using a white on black scheme (included in qmltermwidget). The white on black is then colourized later depending on the settings the user choses; this makes customizations really straightforward (pick background and foreground colours and you have a decent looking terminal), but fine tuning becomes a lot harder.

What I'm planning to do in the future is to expose the underlying settings and allow deeper customizations of the schemes, but it's not going to come soon. I'm graduating next week and looking for a job, but once the situation settles a bit I'm going to start working on CRT again.

The only thing I can suggest you right now is to edit the file qmltermwidget/lib/color-schemes/cool-retro-term.schema before compiling the application. If you set there the proper colours and leave white on black in the CRT settings panel everything should look fine.

Swordfish90 avatar Apr 23 '15 13:04 Swordfish90

@Tribex, outstanding job with the Kindle-ish theme! It REALLY looks great! The refresh stuttering feels right too (although this screenshot does it no justice):

2015-04-23-14-39-57-398062703

Assuming @Tribex is on board, I encourage you to make a PR that adds this profile to the defaults + a readme screenshot. I believe they're stored in app/qml/ApplicationSettings.qml.

The Fizz-Light profile looks fine in black and white but as soon as you turn on colors everything looks washed out which was the issue I was hitting against and I think it'll need @Swordfish90's handywork :/ I feel kind of bad with you having implemented the Kindle-ish theme so nicely so if you open a bug for just that or toss me your email address, I'll gladly give tip you to show my appreciation!

@Swordfish90 congratulations on your upcoming graduation! Definitely focus on your studies and work. I've currently set the bounty expiry at six months but will happily reopen it if it's a bit further out still. In the mean time, I'll dig into your suggestions. THANK YOU!

niedzielski avatar Apr 23 '15 20:04 niedzielski

@Tribex er, maybe the themes are actually under qmltermwidget/lib/color-schemes/? I didn't realize the repo used submodules until I started digging into @Swordfish90's suggestion.

niedzielski avatar Apr 23 '15 21:04 niedzielski

@Swordfish90 Ah, okay, that makes sense. I'll look into that. (Though I don't know QML, yay, something to learn!) The profiles for CRT are in app/qml/ApplicationSettings.qml, while the terminal color schemes are in qmltermwidget/lib/color-schemes, and I think those are where the issue lies. Speaking of that, how exactly do you enable colors in the terminal? :L

An interesting idea would be to somehow integrate the color schema parsing with the JSON themes, but that would probably require changes to qmltermwidget, which I assume you want to keep as close to upstream as possible.

Also, awesome project. I might start using this as my default terminal. Have a great graduation!

@niedzielski Glad you like the Kindle-ish theme! How does it do with colors? I would assume it would have similar issues as Fizz-Light, since both have a similar scheme. If not, or it gets resolved, I'll open a PR to add it to the defaults.

Also, both themes were about five minutes of "work". I ain't accepting anything unless we close the underlying issue or work around it. Bounties are amazing motivators though. :)

JoshTheDerf avatar Apr 23 '15 23:04 JoshTheDerf

@Tribex :+1: Let me know if you change your mind :) Kindle-ish really does look great and I wouldn't want you feeling discouraged for the effort.

I believe that 8-color support is built in. I just crank up Edit -> Settings -> Terminal -> Colors -> Chroma Color and Saturation Color to 100%. Kindle-ish is a little drab but works:

2015-04-23-17-31-32-734084885

I've not been figure out a way to tune the colors more favorably. Here's the same printout on a darker profile that's not far off from inverting the Kindle-ish profile:

2015-04-23-17-33-48-529397700

Turning the bloom up to around 25% really makes it in my opinion. Unfortunately the same effect doesn't mix well with Kindle-ish in its current state:

2015-04-23-17-37-08-832072204

It has a kind of pastel effect. Finally, for reference, here's the Ubuntu gnome-terminal with, I believe, a default color scheme:

2015-04-23-17-35-03-754644470

niedzielski avatar Apr 23 '15 23:04 niedzielski

@niedzielski Oh, I see what you mean now. Interesting. I'll definitely play around with the source then. That bloom looks amazing.

Also, just out of curiosity, what window manager/theme are you using? It looks nice and clean.

For adding screenshots to the readme, I'm not entirely sure how to go about that, since imgur is blocked by the government in my country. (China) Otherwise, my kindle-theme branch is ready for a PR.

Currently testing modifications to:

  • ApplicationSettings.qml (Some tweaking may be necessary. saturatedColor's mixing system seems to be a part of the problem.)
  • ShaderTerminal.qml This is probably closer to where the real issue lies. GLSL is a pain. :/

JoshTheDerf avatar Apr 24 '15 00:04 JoshTheDerf

@Tribex sorry to hear about the block. GitHub lets me drag and drop image files into the comment window (and push them via Git as well). If you're having trouble, I'd be happy to take and upload screenshots under your direction on whatever branch.

I would use Xubuntu, which has a nice UI out of the box, but I can never get everything else running as smooth as I can with plain Ubuntu. For example, suspend often flicks back on when I close the laptop lid. On Ubuntu, I can never get Unity nicely configured so I'm using gnome-session-flashback which is the old Ubuntu 10-ish configuration. It doesn't support high DPI (retina) displays well so I've installed numix-icon-theme-circle (free) and Numix Light ($3) which is a little better. For the console, I'm using a pretty minimal Tmux configuration running inside of CRT. FYI, there's some particularly gorgeous configurations on http://www.reddit.com/r/unixporn and related subreddits but I've yet to invest the time in achieving anything as lovely.

niedzielski avatar Apr 24 '15 01:04 niedzielski

@niedzielski That's fine, I can drag/drop as well, I just wasn't sure if that was a good idea since imgur is used for the rest of the images.

Interestingly enough, I use GNOME (not flashback, with a few extensions) and numix-icon-theme-circle as well. My GTK theme is Paper

Still working on shaders. The saturation system feels rather close to a real CRT, but twice as annoying.

EDIT: Increasing chromaColor past 1 (eg, 200%) can help a bit, but not truly solve the problem. backgroundColor being multiplied with the text color is possibly what causes the washout on light themes but not dark ones.

The big issue lies in the shader code mentioned above as far as I can tell. The colors's lightnesses are being inverted on light themes. Fixing this would likely require a rewrite of the color handling to work on the actual palette as @Swordfish90 mentioned, and would likely simplify things as well. There may be a way to solve it in the shader, but I am not experienced enough with GLSL or color mixing to do it myself.

JoshTheDerf avatar Apr 24 '15 01:04 JoshTheDerf

@niedzielski Just a heads up, I'm still working on this. Had to take a break for a couple weeks due to family priorities. Anyways, I think I've isolated the issue and am working on a couple ways around it without too many problems. Still not good at GLSL shaders. :)

(Actually, I've largely fixed the issue except for some annoying hard edges around the text, but I'm not sure the fix is the proper way of going around it. Testing other options.)

It's rather frustrating to have to wait a minute or two to compile each change though. Perhaps the shaders could be loaded externally in a later release?

The issue is on https://github.com/Swordfish90/cool-retro-term/blob/master/app/qml/ShaderTerminal.qml#L300 greyscale_color is not 1 for fully-opaque text, resulting in washed out colors. I'm trying to find a way to normalize it a bit with the blur alpha.

JoshTheDerf avatar May 05 '15 08:05 JoshTheDerf

@Tribex . I'm really glad someone is working on this feature, but please keep in mind that this heavily affects qmltermwidget, and in turn ubuntu-terminal-app. This needs to be taken into account in the design phase.

Swordfish90 avatar May 05 '15 09:05 Swordfish90

@Swordfish90 How does this affect qmltermwidget? Isn't app/qml/ShaderTerminal.qml part of cool-retro-term specifically or am I reading something wrong?

I am trying to preserve backwards-compatibility though. :)

JoshTheDerf avatar May 05 '15 09:05 JoshTheDerf

@Tribex . Currently, the underlying terminal is drawn using the colours of cool-retro-term.schema in the qmltermwidget project. This is then colourized starting from a foreground colour and a background one. The real colours of the original profiles aren't really customizable and this creates the issues with the dark on light profiles. We need to consider the following solutions:

  1. We allow the user to change the underlying scheme. This works but is confusing for the final user (I can select "White on Black" and then colourize it to be "Black on "White").
  2. We allow the user to change the underlying palette. Instead of having foreground and background colour we just use a single screen colour. In this way there is a correspondence between the actual scheme and the output colour "Black on White" and colourize "Amber", "White on Black" and colourize green. This is probably the hardest, but also the best solution.
  3. We map each colour of the palette to a different colour into the shader. This looks more like a workaround and I'm afraid it will lead to inconsistencies in the final image.

If anyone has a fourth (or a fifth) option I'm definitely all ears.

Swordfish90 avatar May 05 '15 09:05 Swordfish90

@Swordfish90 Option two would probably be the most helpful in the long-term, but right now a fix in the shader should be as simple as normalizing the color mixing process.

Perhaps I'm misunderstanding you, but it seems rather easy to fix, Since setting greyscale_color to a value of 1.0 when the text color exists works both in dark and light themes, but with a few artifacts related to blur and burn-in not being handled properly. (Again, speeding up the build step would help greatly. :P)

JoshTheDerf avatar May 05 '15 10:05 JoshTheDerf

@Tribex If you find a way to fix this without complex qmltermwidget changes, it would be awesome (less maintenance, closer to qtermwidget). And if you need specific feedback on your solution feel free to make a pull request so I can see why there are short-comings with bloom and burn-in.

Swordfish90 avatar May 05 '15 10:05 Swordfish90

@Swordfish90 I'd be happy to push a sort-of-fix (hack) that almost works. So far I have nothing universal or proper. Boy colors are confusing.

All it does though is take greyscale_color values greater than 0 and set them to 1. Works, but not a useful fix.

JoshTheDerf avatar May 05 '15 10:05 JoshTheDerf

@Tribex thanks for the update! BTW, I meant to mention that the example color screenshots I posted aren't quite right. Tmux was actually limiting my color output. I've since fixed that and they look more like the Gnome Terminal output. This changes nothing for this feature request but I thought it might be worth noting.

niedzielski avatar May 06 '15 17:05 niedzielski

@niedzielski Ah, that explains it, I thought something seemed a bit off. Won't be able to work on this today, have to head out.

JoshTheDerf avatar May 06 '15 23:05 JoshTheDerf

Sorry, haven't had time to work on this. It's pretty low-priority for me at the moment.

JoshTheDerf avatar Jun 04 '15 13:06 JoshTheDerf

In general, there are a lot of things that are practically unreadable in certain/most profiles. For example, here is PyRadio running in the Green Scanlines profile: image

It isn't much better in any other profiles, but it is somewhat readable in a couple: image

But still there seems to be an issue with Font Color being too close to the Background Color. And the Font Color is dependent on the type of object being displayed.

For reference, here is the same application running in xfce4-terminal: image

tokenwizard avatar Jul 21 '23 17:07 tokenwizard