MAC Terminal: Anyone know how to give text a default background / highlight color? - macos

I wish to have a transparent terminal.
In order the view the letters without increasing the font size, I would like to have a contrast by coloring the text's background.
Does anyone know of a way to do this? Perhaps installing a special font?

Your best bet would be to use bright colored text. I was just experimenting and it seems like a good, bright red stands out on most backgrounds. You can also experiment with the blur effect your terminal has. A higher blur will allow for more background contrast. I did not see a way to color the text's background color itself though.

Related

A way to change the colors of the NetLogo interface controls or the plot border?

I'm trying to adjust the colors of the NetLogo interface for images which will go into a book. The light purple or aqua colors of the controls and the beige-ish border of the plot are not ideal, as they will be grey in black and white and make the text harder to read. I've checked the NetLogo documentation for some way to edit these, and I can't find anything about this.
Is there any way to change the color on these?

Issue with binarization of gray colored text of Tesseract

I am using Tesseract to recognize some values from the photo which is taken via camera of a phone. My problem is that I cannot recognize numbers which are written in gray color. I know that tesseract performs binarization on the input image. I manually performed the binarization and I realized that all gray texts disappear after binarization. As you can see in the binarized image, there are not any values appeared infront of sollwert and pos/neg toleranz. I can manually set a high threshold to keep my gray colored text,but I need a automatic way in my app. Beside that, the high threshold returns a mostly black image which it also lost some of information. Do you have any suggestions on how to keep my gray color text after binarization?
Thanks in advance

OSX NSFont differs from the exact same font in Photoshop

I've set my font in Photoshop to be Helvetica Neue Regular with 22pt - without any additional customizations.
Now I need the exact same result in my OSX application which seems to be quite hard to achieve.
I modify the font of my NSTextField using
self.label.font = [NSFont fontWithName:#"HelveticaNeue" size:22];
I've created a comparison of HelveticaNeue(regular) and HelveticaNeue-Medium, Photoshop and OSX.
It seems like the OSX part is always a bit more bold and has a slightly reduced letter spacing.
It might be possible to play around a while and adjust the font on OSX using NSAttribuedString until it matches to Photoshop font, but is this really necessary? Shouldn't the font be exactly the same?
There are many ways to render fonts. Apparently, Photoshop has its own font-rendering engine and it differs from what NSTextField is doing by default.
If you zoom your image up in size (in a way that doesn't attempt to smooth the result), you'll see that the Photoshop rendering uses gray-scale anti-aliasing while the OS X rendering uses sub-pixel anti-aliasing. The OS X rendering has color fringes. When rendered at normal sizes, those colors end up lighting the different RGB elements in the LCD screen. Rather than looking colored, it just looks like changing in brightness. Basically, sub-pixel anti-aliasing uses the layout of the color elements within LCD pixels to increase the resolution at which it can render.
I also suspect that the OS X rendering engine is using sub-pixel glyph positioning. That allows for the sizing and spacing of glyphs to more closely follow what the font prescribes, making smaller compromises when being rendered to a grid of pixels. For example, look at the first line (Helvetica Neue 22pt: Photoshop). The spacing between the "H" and the "e" and between the "l" and the "v" looks wrong to me. OS X looks better to my eye.
If you render text yourself, you can turn off sub-pixel anti-aliasing using CGContextSetShouldSubpixelQuantizeFonts() and turn off sub-pixel positioning using CGContextSetShouldSubpixelPositionFonts(). (The documentation suggests that turning off sub-pixel positioning also turns off sub-pixel anti-aliasing, although I'm not sure why that would necessarily follow.) See if that produces results more like what Photoshop is giving you.
By the way, it's probably possible to adjust how Photoshop renders the font, too. Just because two things are ostensibly rendering the same font, doesn't mean they will produce identical pixels.

What system color should be used to draw text on accent background?

I need to put text in a panel with accent (PhoneAccentBrush) background. PhoneForegroundBrush for text looks good in dark theme, but doesn't play well with light theme. It looks like the text always should be white regardless the theme.
What color should be used in such cases?
White is probably your best bet. (It's used for the text on live tiles to aid easier readability regardless of the tile color-which is often the accent color.)
You could also consider black.
The size of the panel and the weight & size of the text will impact appropriateness of color choice too.

How to make icon with pink background transparent?

I'm using Visual Studio icon library (VS2008ImageLibrary), there are some BMP files with a pink background. How can I make the pink background become transparent? What software can I use to do this? Any free one?
Thanks
I used IrfanView's batch conversion tool. It's still some work, because you have to click the pink area on every single icon instead of just specifying pink as transparent color, but it worked. It would be easy to write a simple conversion tool using GDI+ though, which I considered as well.
Note that even though you can use them then as transparent images, many of them unfortunately still have ugly edges when you render them on a dark background or use them as overlay. If you just want very few of them, consider tweaking them individually if you think you'll not always have a bright background.
You can try it online provided you can transform your bmp into a gif first.
Or you can grab PAINT.Net (freeware), and apply a transparent background by following this video instructions.
You can do it by using ImageMagick convert:
convert input.png -transparent magenta output.png
By the way, it is not pink, its magenta colour.
While I don't know the modern .NET answer to your question, it's worth noting the historical reason for these bitmaps with magenta backgrounds:
Back in the Win32-only days, there were some Common Controls (like the Toolbar, and ListView) that took these bitmaps and a colour to be treated as transparent, and then rendered that colour as transparent. I imagine that, behind the scenes, they used functions like TransparentBtl.
I know it's something related to Form.TransparencyKey
but I donno what is exactly that pink, you have to know the exact RGB / system or Web color.
if you know please share us

Resources