Spark 3.0.2 Darker Themes

Is there a way to make Spark 3.0.2 darker? Its so bright and white and hurts my eyes. Is there a way to change it to a darker theme or add themes in?

1 Like

Very good idea. I made a ticket for this.
But I can’t yet say when this feature will be done, hopefully very soon.
https://igniterealtime.atlassian.net/browse/SPARK-2328

1 Like

Thank you so much! That would be great.

I would like to know if implementation was done. wasnt it?

Short answer: No, there’s no dark theme at the moment.

Color Editor

There’s a color editor (File -> Preferences -> Appearance -> Colors) that could be an alternative, but it has the following limitations:

  • There’s no option to change the chat’s background/foreground color, which would be the primary solution (I only managed to change the list’s background/foreground colors).
  • The RGB selector is not precise at all, as it uses sliders instead of numeric inputs.
  • There are no options to use hexadecimal colors.

Dev Option

I’m a frontend developer with no knowledge of Java, so take the following with a grain of salt. I did dig through the code and the GitHub repository and found some information. If you’re a Java developer and want to implement this feature, I hope the info gives you a head start.

Pull Request with Theme

Link: Return select theme and add new flat look and feel by Plyha · Pull Request #711 · igniterealtime/Spark · GitHub

This pull request includes a new theme, FlatLaf IntelliJ. It looks like this theme is from the FlatLaf component (from formdev - link on post bellow), and this component has a dark theme option.

So, one option might be to use this pull request as a base and create the dark theme using the FlatLaf dark theme. Check the files in the pull request to see what’s happening, and maybe create a new file, core/src/main/java/org/jivesoftware/spark/ui/themes/lafs/SparkIntelliJLafDark.java, to import the dark theme from FlatLaf and add the new option to the theme combo box.

One problem noted by the author is the icons: “Maybe later we can add a dark Look and Feel, but a lot of icons need to be redrawn.” I will talk more about this below.

Branch - Dark Theme

Link: Commits · igniterealtime/Spark · GitHub

It looks like there’s already a branch with the dark theme, but the problem is the branch hasn’t been updated since April 2023 (more than a year ago). The commits there might be a good starting point too.

One commit that caught my attention is Split icons into light and dark themes . However, there’s only a light icons folder there. It seems, once again, that dark theme icons are needed.

Dark Icons

In both cases, it seems there’s a need for dark theme icons, but there’s no need to draw them from scratch.

I might have an easier solution:

  • Convert all icons from PNG to SVG (there are tools that can convert multiple images at once, like convert io - link on the post bellow).
  • Change the fill property on each SVG (there’s probably a way to batch-change them using scripts).
  • Convert all icons back from SVG to PNG.

Again, I’m not a Java developer, so there’s probably a lot more needed, but I hope this helps if anyone wants to implement this much-needed feature.

So, would be nice to have the following features:

  • ANY dark theme (priority)
  • option to have custom themes, so the community can create and upload themes
  • Color Input:
    • hexadecimal input,
    • more precise RGB selector(with number inputs),
    • option to change Chat’s background and foreground color

PS: If anyone from the Spark Team is reading this, please consider implementing this feature. Almost every app today has a dark theme, and as fellow developers, you know how a light theme can strain the eyes. Thank you for your hard work. :slightly_smiling_face:

1 Like

Links from previous post (I’m new, so I can only have 2 links per post)

I’ve raised a new ticket for this in our issue tracker: [SPARK-2344] - Ignite Realtime Jira

Hello Spark Development Team,

First, thank you for your incredible work on Spark. This open-source project has been invaluable, and I truly appreciate the efforts everyone puts into making it better.

I’d like to make a suggestion that, I believe, would benefit many users, including myself. Could you consider adding a dark theme option to Spark? Dark themes are increasingly popular as they reduce eye strain, especially during extended usage in low-light environments. It would be a fantastic enhancement to the user experience.

Unfortunately, I am not a developer and, therefore, cannot contribute to the codebase. However, I would be happy to support this improvement through a financial donation to the project if it encourages development in this direction.

Thank you for considering this suggestion, and for all the hard work you continue to pour into Spark!

Best regards,