Colour Theme per project.

已回答

hi, i have many projects opened at the same time and in order to keep the confusion down, i want separate colors,themes for each project.

for example, if i have a branch project open, the background for java files will be greenish while the trunk project will have white backgrounds.
i've tried to change this but ended up changing all intellij instances.

is this possible?

26
Avatar
Permanently deleted user

i found something.  this will change the background of the project pane.  not the file editor but that's good enough for me.

Settings>Project Files
add a new one
select "All Files"
pick a color
select "use in project view".
optionally deselect "use in tabs"

6

Is there any way to do this for the file editor or the window as a whole? Ideally my two windows would look very different (I'm frequently editing two different projects that look very similar, and it would be easy to apply edits to one that I don't intend, if the editor itself is the same color).

3
Avatar
Permanently deleted user

i've been thinking about this as well. Anyone who works on any sizeable project, where there's different repositories will have run into the problem of accidentally working in the wrong one. Thanks @derek dick for that tip. Better than nothing!

0
Avatar
Permanently deleted user

I can't find "project files" under Preferences (on a mac)

can you be more specific? are you talking about editing Scopes? I can't figure out what you guys are doing.

0
Avatar
Permanently deleted user

OK I got it. Preferences > Appearance & Behavior > File Colors
Then click + to add new to "local colors". Basically we are associating a color with a Scope, so I add "Profile Files" which is my default view. Select a color to go with it, and deselect "Use in editor tabs". you do want to Enable File Colors and Use in Project View.

What you get is a colored project view panel. So I have RED here for my admin project and green for my customer-facing project.




9
Avatar
Permanently deleted user

While Max's suggestion is a good start given the tools we currently have, here's what I think would my ideal scenario.

I'd like to be able to change the header area's background color based upon project, possibly the window decoration bar (though this would have to be done in the window manager and is not the responsibility of intelliJ), and also the icon used when alt+tabbing and/or in the taskbar.

The different icon (or a differentiated version of the same icon) would be most helpful in ensuring that I reach the right workspace, but once I'm there some coloring/theming difference is also required to ensure that I'm not doing work in the wrong place.  Chrome used to have different icons for the different chrome profiles you made that would show up in the alt+tab UI as well as in the taskbar (they have since broken this functionality, much to my chagrin).  I struggled to find a good picture of it online, but here's the best I could do.  While this seems involved (overlaying images on the existing icon), I would be happy with the ability to specify a custom icon per-profile too.

 

The purpose of doing this, at least for me, is I like to have several branches of work open at once and the easiest way to accomplish this is to have several intellij projects.  I realize this can (and sometimes is) done by stashing work and switching branches with git, this is a very lengthy process and the side-by-side development saves a lot of pain.

Thank you for considering any options to make this process more streamlined.

3

Check out https://stackoverflow.com/a/40861163/17697 for a clever solution that does exactly what I was looking for.  I made a few 1px by 1px pngs of various colors and set them as the background images on different projects.

2

Project Labels is a pretty decent plugin for differentiating project windows. Not as distinctive as some of the other solutions here, but definitely helps.

2

The material UI plugin has a feature you can enable in the settings where each project is assigned a colour across the top of the application window with the project name written in it.

Super easy to see when your flipping through windows in task view(windows) or command centre(mac) and is a must-have feature IMO.

The colours are generated from the project name too so it will always be the same colours for the same projects on different computers.

https://plugins.jetbrains.com/plugin/8006-material-theme-ui

It used to be free but now they want payment for enabling the extra features including this one 😢.

I've asked them to sell this one feature by itself as it was the only reason I wanted it coz I don't actually care about the colour themes just want the project colours.

They offered me a discount if that's the only feature I want it for. If more people ask for it maybe they will release it as a separate plugin.

I've been trying to live without it and find an alternative hence I ended up here. But there is no good alternative it seems so might just pay them. 😫

0

Hello everyone!

I've found other one solution - is to set background image to entire project window.

  • File -> Settings... -> Appearance & Behavior -> Appearance
  • Push Background Image... button
  • Then tune up your background image
  • Set checkbox This project only as checked

And of course changes will apply only after Apply | OK button in Settings window.

3

I am using Hyperflash00 solution with a different image file painted entierly with the color I want as a background. Made several files for the different projects I work on. Very easy. Just keep the files in a place they will not accidently get deleted. 

0

I'd warn anyone against the Material UI solution by Bradley. Not only does it cost money to even enable the option (as he warns), it doesn't seem like it works like it would be expected, at least not from my standpoint.

"Per project" suggests that, no matter how many projects I have open, I'll be able to differentiate from each one. Their use of the term is entirely misleading. From the look of it, what it does is that when a project is open, it sets the tab coloring for EVERYTHING that is currently open to it.

So, if you have Project A set to red, and Project B set to blue:
- Starting with IntelliJ completely closed.
- Open Project A, and you'll see your tabs as Red
- Open Project B in a new window, without closing Project A
- Tabs in Project B AND in Project A will now be Blue.

The reason that I wanted this feature was because I have multiple projects open at a time, and this is not at all what I expected by "Per Project"

1

I think you might be using the wrong feature. You cant set the colour and it doesn't colour the tabs.

The setting your looking for is a simple check box toggle it on and it will automatically pick a colour based on the project folder name and apply it as a bar of colour at the top with the projects name in the middle.

I don't have it installed anymore so I cant show you right now.

0

Or the project has changed, and what you're suggesting no longer exists/there's a new setting you're not familiar with?

This is what's available.

0

Your right that is new. i was talking about Project Frame.
If the new feature isnt working properly best to report it. Its only 1 dev supporting it but hell probably get to it eventually.

0

yon nice! I can't find it when searching in the marketplace as the readme suggests.

This did trigger me to search for "project frame" (that feature I mentioned before in the Material UI plugin) tho as I remember asking the dev if he can make this a separate feature from the full paid version and it looks like he did!
https://material-theme.com/docs/configuration/project-frame-settings/

He has however made the confusing setup that requires the full UI plugin and being able to use it without using the paid features. It is a very confusing setup esp since it prompts with the setup wizard when the only thing you want it the project frame and have to enable it at the last screen in the wizard.

Super confusing but seems to be working.

0

Bradley Hayes so IntelliJ are still reviewing my plugin, in the meanwhile, you can download it from the releases in that github link.
Also I found this material theme setting, but it's awful, it doesn't let you customize the color and what's worse it creates 
an ugly component under the title bar.. My plugin is better 😂

1

Bradley Hayes forgot to mention, it might not work on mac

0

For the other person confused about the project frame, I can show a picture now I have it installed again. Here is what it looks like when you turn it on:
makes it really easy to see when switching via task view:

I like not having to pick a colour and that the colour for each project is always the same if I open the same projects on other systems.

yon I'll try yours when its approved let us know I'll be switching to Mac soon too so I can let you know how if it works there too.

0

Bradley Hayes Thanks for proposing the Material UI as a solution :) I know it's not a great one considering it's not a free one but I'm grateful nonetheless. (I am the plugin author btw)

A few points:

- The Per project Settings allows you to configure your own color per project, if you hadn't seen that. Though like you said the autogenerated colors are usually fine.

- Recently I finished the "Material Theme Bundles" task and published separate bundles for each of the "big features". The Project Frame is one of them: https://plugins.jetbrains.com/plugin/19310-material-theme-ui-project-frame . This allows people with the Free Version to benefit from the Project Frame without purchasing the full package (It still costs money).

- yon Congratulations on the plugin! I am currently working on a solution at the moment but I am not sure if it would work on Windows, so I'll recommend your plugin if you manage to publish it to the Marketplace. In the future though this feature will be available for the Project Frame customers.

0

Bradley Hayes my plugin got published, and I got it to work on Mac!

https://plugins.jetbrains.com/plugin/19463-project-color

Have fun!

P.S in contrast to the material UI guy, my plugin is free;)

2

I'm happy for you, now people will have a free alternative if they don't want to buy the plugin. It's still different as in the Material UI as we add a bar on the top with the project name and icon, but nonetheless it's a very useful plugin. I am very impressed by the color picker to show results on the fly, it's very nice to use.

By the way small nitpick at this point but it doesn't actually the title bar in Mac: 

0

Which intellij product version have you tried? I tested it on all versions starting from 2021.1

0

2022.1. I also checked without Material UI in case it was the issue but still.

0

Oh I apologize, in Mac its setting the bar below the title bar, with all the build options etc.
Thanks for your feedback! Glad to hear you're Israeli btw

1

yon congratulations getting published dude! Thanks for building making it mac compatable.

I havent got it working tho I might post on your github about it.

0

yon It also works this way in PhpStorm on Linux - only the bar with breadcrumbs, debug controls etc. is colored. But I'm happy it works, it'll save me from some "why can't I find this file... oh, wrong project" times. Thanks. :)

0

Not working on last version of Webstorm 2022.3 ... 

java.lang.ClassNotFoundException
    at com.github.nowtilous.projectcolor.color_setters.ColorSetter.findComponent(ColorSetter.kt:72)
    at com.github.nowtilous.projectcolor.color_setters.MacOSColorSetter.findFilePathComponent(MacOSColorSetter.kt:28)
    at com.github.nowtilous.projectcolor.color_setters.MacOSColorSetter.setTitleBar(MacOSColorSetter.kt:15)
    at com.github.nowtilous.projectcolor.TitleBarSetterKt.setTitleBarColor(TitleBarSetter.kt:24)
    at com.github.nowtilous.projectcolor.ui.ChooseColorAction.actionPerformed$lambda-0(ChooseColorAction.kt:17)
    at java.desktop/javax.swing.colorchooser.DefaultColorSelectionModel.fireStateChanged(DefaultColorSelectionModel.java:153)
    at java.desktop/javax.swing.colorchooser.DefaultColorSelectionModel.setSelectedColor(DefaultColorSelectionModel.java:103)
    at java.desktop/javax.swing.colorchooser.AbstractColorChooserPanel.setSelectedColor(AbstractColorChooserPanel.java:214)
    at java.desktop/javax.swing.colorchooser.ColorPanel.colorChanged(ColorPanel.java:150)
    at java.desktop/javax.swing.colorchooser.ColorPanel.setValue(ColorPanel.java:175)
    at java.desktop/javax.swing.colorchooser.DiagramComponent.mouseDragged(DiagramComponent.java:141)
    at java.desktop/javax.swing.colorchooser.DiagramComponent.mousePressed(DiagramComponent.java:118)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6645)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392)
    at java.desktop/java.awt.Component.processEvent(Component.java:6413)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4572)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:831)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:753)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:774)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121)
    at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:191)
    at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:236)
    at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:234)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
    at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:234)
    at java.desktop/java.awt.Dialog.show(Dialog.java:1080)
    at java.desktop/javax.swing.ColorChooserDialog.show(JColorChooser.java:775)
    at java.desktop/java.awt.Component.show(Component.java:1749)
    at java.desktop/java.awt.Component.setVisible(Component.java:1696)
    at java.desktop/java.awt.Window.setVisible(Window.java:1042)
    at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1016)
    at com.github.nowtilous.projectcolor.ui.ChooseColorAction.actionPerformed(ChooseColorAction.kt:22)
    at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:195)
    at com.intellij.openapi.actionSystem.impl.ActionButton.lambda$performAction$0(ActionButton.java:174)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:346)
    at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:174)
    at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:462)
    at java.desktop/java.awt.Component.processEvent(Component.java:6413)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:831)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:753)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:774)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

0

请先登录再写评论。