Monnoroch / ColorHighlighter

ColorHighlighter - is a plugin for the Sublime text 2 and 3, which underlays selected hexadecimal colorcodes (like "#FFFFFF", "rgb(255,255,255)", "white", etc.) with their real color. Also, plugin adds color picker to easily modify colors. Documentation: https://monnoroch.github.io/ColorHighlighter.
https://sublime.wbond.net/packages/Color%20Highlighter
1.31k stars 130 forks source link

Incorrect "inline text color highlighting" #391

Open Monnoroch opened 7 years ago

Monnoroch commented 7 years ago

Mane people report that when using "inline highlighting > text" the background is incorrect:

example example example example

I can't reproduce this myself, so I need help on this.

389, #378, #382.

h0jeZvgoxFepBQ2C commented 7 years ago

OSX Sierra, ColorHighlighter 8.0.9

Sublime: bildschirmfoto 2017-10-09 um 16 15 55

User-Settings:

{
    "enabled": true,
    "style": "default",
    "icons": true,
    "ha_style": "solid",
    "icons_all": false
}

bildschirmfoto 2017-10-09 um 16 19 58

Monnoroch commented 7 years ago

@lichtamberg your user settings are from the old version and do not work on the new one.

h0jeZvgoxFepBQ2C commented 7 years ago

I see, I just disabled the block display and now it doesnt work anymore at all -.- (even when I enable it again)

h0jeZvgoxFepBQ2C commented 7 years ago

I removed now my whole user config for color highligher ( => {}) - it "works" now again, but I have the same problem again now like I mentioned above:

bildschirmfoto 2017-10-09 um 17 27 07

Any hints? As I said, user config file is an empty json hash and I restarted Sublime several times.

Monnoroch commented 7 years ago

@lichtamberg what is your color scheme called?

h0jeZvgoxFepBQ2C commented 7 years ago
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme",

Source: https://github.com/tdm00/sublime-theme-railscasts

But you are right, it looks like it's related to the color scheme.. When I chose a different one, it looks like its working better.. Will test more..

Monnoroch commented 7 years ago

@lichtamberg wait, you posted the color scheme settings. Some plugins override the scheme for specific views. Can you screenshot the color scheme picker view while having the file with colors open.

h0jeZvgoxFepBQ2C commented 7 years ago

bildschirmfoto 2017-10-09 um 17 38 46 bildschirmfoto 2017-10-09 um 17 39 36

Hope this helps? I think its really related to the custom color scheme.. But had no problem before with this theme..

h0jeZvgoxFepBQ2C commented 7 years ago

LOL. It work's now, but the only thing which I changed was, that I just copied the whole ColorHighlighter-Config into the user config.

It really looks like there was some wrong caching or.. Idk.. Works now like a charm again. Strange.

bildschirmfoto 2017-10-09 um 17 47 45

Monnoroch commented 7 years ago

@lichtamberg you have a sublime linter enabled: https://github.com/Monnoroch/ColorHighlighter#inline-color-highlighting-works-incorrectly.

Monnoroch commented 7 years ago

Can you please test it with SL disabled?

h0jeZvgoxFepBQ2C commented 7 years ago

Problem is now, that it's working :D If I have the same problem again, I will disable SL and report it if I continue to have problems. Thank you very much for taking time and your great plugin!

Monnoroch commented 7 years ago

@lichtamberg my hypothesis is that SL and CH compete for the color scheme and break each other. If you have the problem again, please try to disable SL and check it that way.

isaumya commented 7 years ago

I'm having very weird color highlighting in Windows as well. Screenshot attached. I have no idea if this has any way fix. Take a look. 2017-10-15_22-15-23 I have no idea where that orange background is coming from. BTW I'm using the latest Sublime Text on Windows 10 P.S.: I'm using the Material Theme of Sublime Text

Monnoroch commented 7 years ago

@isaumya what plugins do you use besides CH?

isaumya commented 7 years ago

@Monnoroch in terms of theme I use the Material Theme. Along with A File Icon, Bracket Highlighter. The rest packages I use has nothing to do with interface. It is mostly for coding.

Monnoroch commented 7 years ago

@isaumya this is the most likely reason: https://github.com/Monnoroch/ColorHighlighter#inline-color-highlighting-works-incorrectly. Could you please test CH without any plugins enabled (and a ST reload) and see if the problem persists? If it doesn't, please find the incompoatible plugin so I can add it to the readme ar an issue. This would be of great help!

isaumya commented 7 years ago

@Monnoroch Hi, I was able to make it work just changing a small settings in the color highlighter:

2017-10-15_23-44-56

Earlier it was Text and I have changed it to Filled.

Monnoroch commented 7 years ago

@isaumya good, but that doesnt help me with debugging the problem. Can you change it back now? Will it work?

isaumya commented 7 years ago

No. if I change it back to Text it gets messed up. I think it is an incompatibility with material theme. I'm happy with changing the Text to Filled. :)

Monnoroch commented 7 years ago

@isaumya can you please test it with the default Monokai? Does it work correctly then?

isaumya commented 7 years ago

@Monnoroch yes I've tried with the default theme and it work fine with that. But as I can't consider using anything but the Material theme (because I'm deeply in love with it), so for the me Filled thing is just work fine.

Monnoroch commented 7 years ago

@isaumya ok, thanks, good to know that not all themes are compatible!

jaegz commented 7 years ago

I too was getting the orange highlight but the text was showing the correct colors. @isaumya's fix worked for me too.

Tools > Color Highlighter > Color highlighters > Highlight colors in all text > Inline highlighting style and then changed Text to Filled and now it works perfectly. Changing it back does not work.

colorhighlighter-orangehighlight colorhighlighter-orangehighlight-fixed

System Windows 7 Pro 64bit Sublime Text 3 Version 3.0, Build 3143

Sublime Settings Theme: Seti UI Color Scheme: Blackboard (SL)

Packages ApplySyntax Babel Color Highlighter EJS Emmet Package Control PyV8 Sass Seti_UI Seti_UX SublimeLinter SublimeLinter-jshint TernJS Themr

Monnoroch commented 7 years ago

@jaegz can you also test it with the defaut color scheme and tell me if it works or not?

Monnoroch commented 7 years ago

@jaegz actually, it won't, you have a problem because of https://github.com/Monnoroch/ColorHighlighter#inline-color-highlighting-works-incorrectly.

jaegz commented 7 years ago

@Monnoroch thanks for the reference. So in my case, running the Blackboard (SL) color scheme is where the conflict arises as Monokai (default) did work for me along with the highlight Text setting

colorhighlighter-monokai default

mikehdt commented 7 years ago

Definitely some unusual behaviours with SublimeLinter. Disabling all the SL plugins doesn't seem to stop the behaviour of making copied (SL) schemes. I guess it has to be uninstalled?

What's weird though, is I've had them coexisting peacefully in the past - not sure whether it's newer Sublime builds (using 3150 on High Sierra) or the CH 8.0 changes or something else. I can't seem to make them be peaceful again. It'd be nice if Sublime had a better way for plugins to mix in their theme overrides rather than making loads of copies of colour schemes :S

Here it seems to invert the colour underlines, although the gutter swatch is correct:

screen shot 2017-10-19 at 10 56 10 am

Clicking on colours doesn't appear happy at all though, it just seems to use the default colour scheme highlight.

Monnoroch commented 7 years ago

@mikehdt there is a way to mix them: it's called use something other than "inline" highlighting in CH :) However it's not as pretty to some people.

mikehdt commented 7 years ago

@Monnoroch I'm not sure if there was an update to CH or whether the most recent Sublime build (3153) has done something, but the colour highlighting is working well again - correct colours, correct highlighting on click :D

Monnoroch commented 7 years ago

@mikehdt I'm tolally fine with taking the credit!

isaumya commented 7 years ago

I can also confirm this. Now with Filled selected there is no issue whatsoever. Recently both Sublime Text and the Material Theme got updated. Not sure whose update fixed this issue. But whoever it is, thank you for fixing it. 🙏