I see the same, and it seems to be related to what value I set in the Windows 10 display settings scaling slider (I don’t know what that changes under the hood). But you can see in the attached image what the color boxes look like at 100% vs what happens when scaling goes up to 150%. The larger the scaling percentage, the bigger the color boxes get.
ColorHelper 2.0.0
@wbond, one thing I 've noticed on my 4K setup is that image distortion is back; notice the how some borders are thicker than others:

With that said, I don’t see the large image issue, at least not on my 4K setup; I’m using 125% scaling on Windows 7.
I will try out my Windows 10 machine tonight, but I am also using a scaling hack/app that let’s me scale things like they did in Windows 7, so I’m not sure how that will turn out.
If you are running at 125% perhaps the pixel dimensions of your images are not equaling the pixels on your screen? If you can paste the HTML, CSS and one of the images here, I can try and dig into see why it may be displayed that way.
The most recent distortion I recall was caused by the image being taller than the line-height, and the code calculating the padding to account for the line height was resulting in negative padding. This looks like a different issue.
There of course was a change when we fixed rendering all non-font CSS dimensions as device-independent pixels on Windows and Linux instead of as device pixels. This is how OS X has always done it, since the OS takes care of the scaling. This is why I am guessing it is some sort of interplay between the scale (125%) and device pixels. I would imagine that the ST codebase should handle painting your image with interpolated pixels, but that is why the CSS, HTML and image would help. Otherwise I may find working examples that are just different than the non-working code you have.
@jcberquist, As I recall, Windows 10 scales GUI stuff very different to how they used to. So much so that I found it very annoying. Some apps had blurry graphics that weren’t blurry in Windows 7 (I think they double the size of graphics similar to Apple retina, but I found many apps incompatible with these changes). The more I think about this, the more I’m fairly certain this issue is most likely Windows 10 specific. When I verify on my Windows 10 machine, I will probably also disable my scaling hack/app that reverts things to the Windows 7 way to be sure.
Unfortunately, I missed reporting before ST’s next beta, but I am very much convinced that ST has introduced new image sizing issues (not like the one that was just fixed, but like previous issues before that). Looks to be stretching images in the X and/or Y directions. Hopefully I will get around to posting a stripped down example tonight.
Still haven’t had a chance to test out scaling on Windows 10, but hopefully tonight as well, been a busy week for me.
I do have an answer now for why we are getting larger than normal images in ColorHelper.
-
The reason the scale factor in
mdpopupsisn’t working is because 1) images where never affected by the font scale. Images are sized based on line height. The reason why fonts are aren’t affected by recently by scale height is because mdpopups had implemented its own relative fonts, but in recent builds, Sublime provided its own relative font units. So in the latest builds,mdpoupsuses Sublime’s relative font implementation by default instead of our cobbled together hack. You would have to change the default CSS to take advantage of the old font scale hack, but this is not recommended as the Sublime implementation is better and is the recommended way. So in short, I incorrectly recommended changing the font scale for recent builds. I simply forgot about these changes. -
Images are large because Sublime is now reporting line heights as 2X bigger in Windows 10 (have not tried Linux) than other OS’s (this is only in the very latest Sublime builds that added hi def support for Windows and Linux).
So I need to now detect Windows 10 systems with hi def screens. Python isn’t quite reporting a helpful windows version, but I am sure I should be able to figure out detection of Windows 10 systems from Windows 8 systems soon.
What is more difficult is telling when Sublime is being used on a 4k system. @wbond, @jps can we please get an API check that mentions when Sublime is in hidpi mode?
In the short term, I will work on detecting Windows 10 systems and provide a setting that can be toggled in either mdpoups or the plugin of interest (I’ll have to see where it makes sense – mabye I’ll provide a function in mdpopups that gives a useful line height) so we can calculate image height properly.
@wbond image distortion so far seems specific to Windows 7 (on my 4K screen - havent tested on non-4K) for me. It sees to be fine on Windows 10.
Are you referring to View.line_height()? If so, I will get that fixed. It should always return device-independent pixels (DIP), such as how CSS in minihtml deals with DIP instead of device pixels.
Without knowing more info about why, my general answer would be that this sounds like a bad idea. Sublime Text should deal with all of the scaling and resolution issues itself, and exposing this sort of thing I think it likely to result in hacks that we have to try and work around. It is certainly possible there are completely valid reasons to know this – so please tell me!
I wanted to know when we where in hidpi mode so I could divide line_height by 2, but sense this will be addressed, this is no longer needed. I wasn’t sure if this would be addressed directly or not. Thanks for looking into this!
ColorHelper 2.2.0
Released Nov 5, 2016
- New: Add support for stTheme and search cdata #59.
-
NEW: Workaround for Windows 10 HiDpi large image issue #61.
See document for more info. -
NEW: Added toggle support for left/right positioned previews #65.
See document for more info. - FIX: Web Color insertion bug #62.
- FIX: Preview duplication bug (hopefully – please report if not fixed) #57.
I like the way your changelog works - very clever use of mdpopups and phantoms, and disabling the gutter to make it seamless 
I notice that the minimap doesn’t show phantoms though, which makes it a little harder to scroll/navigate. I wonder if we should raise a feature request with the ST devs that (certain?) phantoms should be able to be shown in the minimap?
Showing phantoms on the minimap would be a nice improvement. It would also help to make sections visible without putting super huge comments in the code.
Hi, I got a support question ?
How do you enable ColorHelper to handle YAML-tmTheme file ?
I’ve created a user settings file for the package in which I copied the original “color_scanning” list.
I then appended:
{
"syntax_files": [],
"syntax_filter": "whitelist",
"base_scopes": ["source.yaml"],
"allowed_colors": ["hex", "hexa"],
"extensions": ["YAML-tmTheme"],
"use_hex_argb": true,
"compress_hex_output": false
}
But the little color squares doesn’t appear next to my theme colors.
Also why not provide support for this by default ?
And do I need to copy the whole list of existing scanners before appending mine ? It doesn’t seem very convenient.
Because I originally supplied support for the default format. I am assuming this is PackageDev format? I don’t use PackageDev, so that is why it’s not in there. I am not against it being added though.
Yup, because I haven’t gotten around to changing it yet. I’ve just been busy. When I have some free time, and I motivate myself to start refactoring these kinds of things, stuff like this will change. To be honest, this whole plugin is going to go through some major refactoring, but time…and motivation…they fight against me at times
.
As for your original question, I will probably answer it tonight when I have more time…
You should consider using CSScheme instead of PackageDev for color schemes. I find that to be vastly superior when utilizing preprocessors like SASS.
I use the following color_scanning settings:
{
"color_scanning": [
{
"base_scopes": ["source.csscheme"],
"scan_scopes": ["constant.other.color-hash"],
"allowed_colors": ["hex", "hexa", "hex_compressed"],
"use_hex_argb": false,
"compress_hex_output": false
},
{
"base_scopes": ["source.csscheme.scss"],
"scan_scopes": ["meta.function, constant.other.color-hash"],
"allowed_colors": ["css3", "hexa"],
"use_hex_argb": false,
"compress_hex_output": false
},
...
}
}
(doesn’t include X11 color names because fuck 'em)

thank you, I love this one!
.