Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background colors for base.user.css not true in Ubuntu #4924

Closed
3 tasks done
dajare opened this issue Dec 13, 2021 · 2 comments
Closed
3 tasks done

Background colors for base.user.css not true in Ubuntu #4924

dajare opened this issue Dec 13, 2021 · 2 comments

Comments

@dajare
Copy link

dajare commented Dec 13, 2021

  • Searched existing issues to avoid creating duplicates.

  • Confirmed that it can be reproduced in built-in themes without customized css.

    I have checked this with ALL built-in themes (I do not use 3rd party themes).

  • Searched http://support.typora.io/


Describe the bug

In my base.user.css file, I have defined body: {background-color: #f0ead6;} (= "eggshell"), and with two header levels, background-color: #ebe3c8;. However, when "loaded", Typora displays on-screen with these values:

css on-screen
f0ead6 f1ead7
ebe3c8 ece3ca

This is subtle, but still significant to my eye, and ... ought not to be! The color defined in the CSS should be the color I see on screen.

To Reproduce

Steps to reproduce the behavior:

  1. Define background color in base.user.css.
  2. Check with "color meter". (I am using Gpick for this. The difference is visible to the "naked eye", however. I use the same color scheme for LibreOffice Writer, and they stay "true". Comparing Writer and Typora makes the difference very obvious.)
  3. See that color does not match the CSS value.

Expected behavior

I expect to see the color on screen exactly as defined in the custom CSS file.

Screenshot

screenshot with differences

Yes, subtle (do check with a color meter!), but there shouldn't be any variation.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.06 LTS

Typora Version = 1.0.3 (registered)

@abnerlee
Copy link
Contributor

Did you try launch Typora with flag --disable-color-correct-rendering

looks like an upstream issue electron/electron#10732

And see the comment here electron/electron#10732 (comment)

in CSS, hex colors should always be resolved in sRGB, per spec.

@dajare
Copy link
Author

dajare commented Dec 30, 2021

Did you try launch Typora with flag --disable-color-correct-rendering

Many thanks for the reply, and the pointers. I have only just now been able to get back to check and test. With the flag as recommended, nothing changed (even with my hex colors converted to sRGB). However, I found this comment in the Electron thread you linked. It included this:

app.commandLine.appendSwitch('disable-color-correct-rendering');
app.commandLine.appendSwitch('force-color-profile', 'srgb');

worked for me for electron v11.0.1

I adapted that to: $ typora --disable-color-correct-rendering --force-color-profile=srgb

And that worked in Ubuntu 18.04.06 LTS. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants