I'm trying to change the color manually to my liking.
Default looks somewhat like this:
<Item Background="0x02000000" BoldFont="No" Foreground="0x008CFAF1" Name="XML Attribute Quotes" />
So I want to change the Foreground, but I don't quite understand the format of the Color Code.
When I search hexadecimal color codes, they're 6 digits. For example: https://peteroupc.github.io/html3dutil/tutorial-colors.html
So Is it right to just add "0x00" in front of that? Seemingly all Colors I want to change start with that anyways. As far as I can tell only exception would be a default value starting with 0x02.
You don't need to do any conversion with these, as they are already hex (actual code hex, not the #... web stuff). To "convert" a web hex triplet, just remove the # and prepend 0x00 and you should be good. All the other characters remain the same (case shouldn't matter, though some people like uppercase as procedure).
-according to this: .vssettings file (Visual Studio Settings) Color Format
It says 0x02 default down below there
Related
I'm trying to figure out a way to render certain unicode characters as a custom character instead of how they are supposed to appear.
For example, I would like the character U+0E4A to render as something else rather than how it currently appears in Windows.
I tried to create a quick custom font and to replace those glyphs but it only seems to work in some programs. My font will work correctly in LibreOffice Writer but it won't display properly in WordPad. Replacing regular letters works fine, but for other unicode characters they seem to revert back to a default way of rendering and don't display correctly.
Here is a screenshot of my custom font in WordPad, as you can see I made an obvious edit to the B character but I also did the same to the U+0E4A code point and yet it renders as normal.
If there is a special font that already does this that would probably save me the time of making a custom font, but either way I can't figure out how to render these characters as a custom character.
Not sure if SO is the best place for this question, but don't know where else to ask.
Is there any way to transform a svg like this one for ex: (https://svgsilh.com/image/1775543.html) into something that i can use inside an editor with copy/paste like this one? 🦄
No, because the unicorn emoticon is one example of a character. And just as with letters, digits, and punctuation, the appearance of emoticons and other plain-text symbols is decided by fonts.
LSerni wrote the following:
The reason you can "copy and paste" that icon is that the icon already has a UTF-8 code and your editor is UTF-8 aware. And this is why the same emoticon is slightly different between Apple, Android and so on: it's because it's always code XYZ, but code XYZ is rendered with different icons on different platforms.
But that's not entirely correct. The difference in rendering lies more in the font than in the operating system that displays emoticons. Unless the font supplies its own version of a symbol, that symbol will usually be supplied by the font specified by default by the operating system, and different operating systems supply different symbol fonts.
I was doing a visualization in this years adventofcode. My first stab just used plain ascii chars video here. Then I saw this image
Which I thought was really nice. However, when I attempted to put in these chars, they completely overlapped.
Is there a nice way to do this? I've tried installing gnu unifont as that sounded like a decent start, but no joy.
How do I use the terminal to print "letters" like this and have them come out nicely? I might be missing something fundamental about terminals + UTF8. If it matters, I'm using OSX terminal app, Anonymice Powerline Nerd Font Complete Mono font.
EDIT
Yes, the font didn't contain items which were encoded correctly (or was falling back?! if that's even possible, to items which weren't encoded correctly)
I ended up using the symbola font which, while not perfect, means I can draw this:
which is good enough!
It looks as if the "patched font" didn't set the font metrics properly. Terminals expect the font header to give a bounding box which applies to all characters. If the individual glyphs don't fall into the box, you'll get interesting effects like this.
I just imported new fonts and colors for Visual Studio 2008. I want to change the color on the ref keyword on a parameter to stand out a little more. Anyone know what option that is in the Display Items under Fonts and Colors?
That's not how syntax highlighting works in VS2008. It is done by 'lexical analysis', not a language parser. In other words, it tokenizes the text in the source code file and classifies them by lexical type. Keyword, identifier, number, string literal, comment, whitespace. And gives them their associated color.
It is important that it works that way because lexical analysis is fast, parsing is slow. Getting text to repaint in a text editor needs to be fast. Accordingly, it has no option to classify individual keywords, the only option you got is the "Keyword" color in the dialog. Which changes the color of all keywords, not just ref.
I'm trying to output RTF (Rich Text Format) from a Ruby program - and I'd prefer to just emit RTF directly without using the RTF gem as I'm doing pretty simple stuff.
I would like to highlight specific characters in a DNA sequence alignment and from the docs it seems that I can either use \highlightN ... \highlight0 or \cbN ... \cb1
The problem is that I cannot get \cb to work in either Word:Mac 2008 or Mac TextEdit (\cf works fine so I know it's not a color table issue)
\highlight does work but seemingly only with two of the possible colors (black and red) and \highlight does not use the custom color table.
By creating simple docs in Word with character shading and saving as RTF I can see blocks of ridiculously verbose RTF code that presumably does what I want, but it is so impenetrable that I'm not seeing the wood for the trees.
Part of the problem may well be that Mac Word is just not implementing RTF properly. I don't have a Windows version of Word handy.
Anyone know the right way to shade blocks of text?
Thanks
--Rob
There is a note in the RTF Pocket Guide that says MS Word does not implement the \cb command. It says MS Word uses \chshdng0\chcbpatN (where "N" is the color number that you would use with \cb). The book recommends using something like the following for compatibility with programs that implement \cbN and/or \chshdng0\chcbpatN: {\chshdng0\chcbpat5\cb5 text}.
Note: The copy of the book I have was published in 2003, so it might be a bit out-of-date.
The sequence of RTF commands that seems to be most universally supported by RTF-capable applications is:
\chshdng10000\chcbpatN\chcfpatN\cbN
These commands:
set the shading to 100 percent
set the pattern foreground and background colors to the color from the color table (we're not actually specifying a shading pattern)
set the character background to the color from the color table
Word was the most difficult application to properly render background colors in:
Despite what the latest (1.9.1) RTF spec says, Word 2013 does not resolve \highlightN colors from the \colortbl. Instead, \highlightN maps to a predefined list of colors. It looks like those colors come from the 1.5 version of the RTF spec.
Regarding \cb, the 1.9.1 spec contains this helpful pointer at the end of the section on Color Table:
Note: Windows versions of Word have never supported \cbN, but it can be emulated by the control word sequence \chshdng0\chcbpatN.
This is almost a useful suggestion, except that if you read the documentation for \chshdngN:
Character shading. The N argument is a value representing the shading of the text in hundredths of a percent.
So, 0 turns out to not be a very useful value; 100 / 0.01 gives us the 10000 we used in the sequence above.
Use WordPad to create RTF documents, not Word. WordPad creates much simpler documents, i.e. approaching human-readable.
I use WordPad every time I need to display formatted text in a WinForms application, and need something that the RichTextBox control can handle being assigned to its Rtf parameter.