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

Colour scheme improvements #331

Closed
pindab0ter opened this issue May 28, 2020 · 5 comments
Closed

Colour scheme improvements #331

pindab0ter opened this issue May 28, 2020 · 5 comments
Labels

Comments

@pindab0ter
Copy link

Is your feature request related to a problem? Please describe.
The default colours are an eyesore and have nothing to do with the active colour scheme and as a result are very jarring.

Describe the solution you'd like
I would like AceJump's colours to use the currently active colour scheme by default.

Describe alternatives you've considered
I've considered changing the colours myself, but this is very bothersome. You'd have to first note down which colours you can customise and which kind of colour they're currently using. Then you'd have to go into your current colour scheme to find colours that would match the description that you now can't see because you're in a different part of the preferences window. You note every colour code you'd like to use, go back to the AceJump preferences and enter them there.

@breandan
Copy link
Collaborator

breandan commented Jun 9, 2020

It's a good idea and would be nice to to have a more visually appealing default color scheme.

The AceJump default colors are defined here in case anyone wants to submit a pull request:

internal var jumpModeRGB: Int = BLUE.rgb,
internal var targetModeRGB: Int = RED.rgb,
internal var definitionModeRGB: Int = MAGENTA.rgb,
internal var textHighlightRGB: Int = GREEN.rgb,
internal var tagForegroundRGB: Int = BLACK.rgb,
internal var tagBackgroundRGB: Int = YELLOW.rgb,

@nickcernis
Copy link

nickcernis commented Aug 13, 2020

Is there a preferred outcome here?

  1. To set less harsh defaults that try to work with all editor color schemes, but that don't use specific colors from the active editor color scheme.
  2. To add a new option on the AceJump settings page to “use colors from the active theme” that would override the custom colors and be activated by default.
  3. To let theme developers specify AceJump colors in their editor color scheme config.

If we want option 1, I'm happy to take this on as it looks like no special JetBrains API knowledge is required to choose different rgb defaults.

if we want option 2 or 3, I'd need some guidance because I'm new to JetBrains plugin development.

If we can set colors from the editor color scheme, these may be good choices to try:

internal var jumpModeRGB: Int = CONSOLE_BLUE_OUTPUT.FOREGROUND,
internal var targetModeRGB: Int = CONSOLE_RED_OUTPUT.FOREGROUND, 
internal var definitionModeRGB: Int = CONSOLE_MAGENTA_OUTPUT.FOREGROUND, 
internal var textHighlightRGB: Int = SEARCH_RESULT_ATTRIBUTES.BACKGROUND, 
internal var tagForegroundRGB: Int = INLINE_PARAMETER_HINT_CURRENT.FOREGROUND, 
internal var tagBackgroundRGB: Int = INLINE_PARAMETER_HINT_CURRENT.BACKGROUND, 

(It would also be worth adding a textHighlightForegroundRGB that could be set to SEARCH_RESULT_ATTRIBUTES.FOREGROUND otherwise there could be some color clashes for highlighted text, but perhaps this is a separate issue.)

I'm not familiar with Kotlin or JetBrains APIs, so would need to figure out how to obtain those values from the editor color scheme and convert to RGB. (I had a quick look and JBColor.namedColor() or javax.swing.UIManager#getXXX() look like they might help?)

@breandan
Copy link
Collaborator

Is there a preferred outcome here?

AceJump currently supports customizing the colors as per #28. I think the simplest solution is to just provide less visually jarring defaults. I suppose we could give options to configure the source, but... death by options.

If we want option 1, I'm happy to take this on as it looks like no special JetBrains API knowledge is required to choose different rgb defaults.

That would be great, thanks for offering! We shouldn't dig too deeply into the IntelliJ Platform API, as ultimately we would like to have a multiplatform implementation. #229

I had a quick look and JBColor.namedColor(...) or javax.swing.UIManager#getXXX() look like they might help?

That looks right, or maybe JBColor.getColor(String nm, Color v) to provide a default if the ID is absent. To get the right color ID, go to Settings | Editor | Color Scheme | General, then select the gear icon next to the Scheme combo box and select Export > IntelliJ IDEA color scheme (.icls) (this is just an XML file), then search for the ID of the color you like. We should probably try to keep the approximate hue on the default scheme, but it would be nice to have a color that blends nicely within the scheme. Feel free to leave screenshots here if you want feedback.

@chylex
Copy link
Collaborator

chylex commented Nov 18, 2020

For Darcula, I came up with a pretty nice theme if anyone wants to copy it.
obrazek
obrazek

@breandan breandan changed the title Default to colour scheme colours Colour scheme improvements Apr 17, 2021
@breandan
Copy link
Collaborator

I think we can close this issue now thanks to @chylex. It would be great if someone could update the README with fresh screenshots / GIFs as per #145. Thanks!

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

4 participants