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

Styles with no text color #902

Open
1 task done
walles opened this issue Dec 18, 2023 · 0 comments
Open
1 task done

Styles with no text color #902

walles opened this issue Dec 18, 2023 · 0 comments
Labels

Comments

@walles
Copy link
Contributor

walles commented Dec 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

A number of styles have Background color without any foreground spec, and no Text color either.

For example, what should the plain text color be in this style?

~/s/chroma (master|✔) $ cat styles/igor.xml
<style name="igor">
  <entry type="Background" style="bg:#ffffff"/>
  <entry type="Keyword" style="#0000ff"/>
  <entry type="NameClass" style="#007575"/>
  <entry type="NameDecorator" style="#cc00a3"/>
  <entry type="NameFunction" style="#c34e00"/>
  <entry type="LiteralString" style="#009c00"/>
  <entry type="Comment" style="italic #ff0000"/>
</style>⏎
~/s/chroma (master|✔) $

As suggested in #867, I tried to extract the Background color (success!) and write text on it.

However, when the foreground color is undefined, this can give me white text on white background, which is unreadable.

More or less related to #212.

To Reproduce

List of styles with Background set but no Text.

~/s/chroma (master|✔) $ grep Background styles/*.xml | grep bg: | grep -E -v 'style=".* .*"' | cut -d: -f1 | xargs grep -L '"Text"'
styles/abap.xml
styles/algol.xml
styles/algol_nu.xml
styles/arduino.xml
styles/autumn.xml
styles/borland.xml
styles/bw.xml
styles/colorful.xml
styles/emacs.xml
styles/friendly.xml
styles/github.xml
styles/igor.xml
styles/lovelace.xml
styles/manni.xml
styles/murphy.xml
styles/pastie.xml
styles/perldoc.xml
styles/tango.xml
styles/trac.xml
styles/vs.xml
styles/xcode.xml
~/s/chroma (master|✔) $
@walles walles added the bug label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant