Highlight AppLocalizations.of(context) in Editor - android-studio

When replacing strings with their translation equivalents, we lose the nice green color that made it easy to spot the strings.
For example:
In Text('Reply') the string 'Reply' is nice and green but when replaced with Text(AppLocalizations.of(context).reply) the new code is pretty much the same color as the rest of the code. It loses that ability to quickly glance and grasp structure.
Is there a way to get Android Studio to color AppLocalizations.of(context) green?

Related

DirectWrite painting ligatures with multiple colors?

I'm using Microsoft's Cascadia Code font and drawing text with DirectWrite using ID2D1RenderTarget::DrawTextLayout, with individual glyphs colored using IDWriteTextLayout::SetDrawingEffect(CreateSolidColorBrush(...)).
Cascadia Code has a ligature for "greater than or equal to" (=>) that draws as a single arrow glyph. If I have half of the glyph selected, using HitTestTextRange to paint the background highlights the correct area, but setting the selected character's drawingEffect to a different color than the unselected side doesn't work. The entire glyph is painted using the drawing effect from the second character, resulting on one side drawing as white-on-white or black-on-blue. GetClusterMetrics returns two separate clusters for it. Conversely, if I have some Arabic text like ممم, which presumably uses a substituted font, it draws as a ligature, but the individual characters within it will draw as different colors.
Is implementing IDWriteTextRenderer the best way to handle this situation or is there an easier one?
Also, comparing Cascadia Code's supported ligatures in Notepad or Visual Studio Code against my app shows that most ligatures are drawn like they should be, but a handful of them aren't. -~ (minus tilde) draws as a single symbol in Notepad, VS Code, my app, and the Windows SDK's PadWrite sample app, but /\ only draws as an inverted V in the first two. The "infinite arrows" like >==>==> are similarly broken up. Is there a setting I need to use to enable all of them?

Want to make all text black in VS Cose

I am using VS Code and have very weak eyes and would like to make all the text of color block as it will make text much more readable. How can i go about it?

Do the colors of the "Zither strings" in VS 2013 signify something? If so, what?

I like the "zither strings" that Visual Studio 2013 displays, that help visually align the braces in try / using / while / etc. blocks of code. I also enjoy them aesthetically, as they appear in different visual representations of points along the electromagnetic spectrum:
But, are those colors "more than a pretty face"? In the screen shot above, I see, from left to right, gray, teal, midnight blue, grey, gray, grey, gray, purple, and grey again. Is this just to help differentiate one line from another? If so, why are several succeeding lines the same hue (as far as I can tell)?
Or, do the colors signify something, such as teal for classes, midnight blue for methods, purple for while, and gr[a,e]y for everything else?
These are part of the Productivity Power Tools for VS2013 (see here). Specifically they are part of the Structure Visualizer feature.
There does seem to be some meaning in the colours. I haven't been able to find a definitive list of colours, but I've noticed the following:
Grey for general blocks, like namespaces, try / catch blocks and using
blocks. The grey for namespaces seems to be a bit darker than other block types.
Teal for classes
Blue for methods
Green for conditional blocks (if / then, switch)
Purple for looping blocks (for, foreach)
You can turn the lines on and off in the Productivity Power Tools section of the Options dialog.

Fabric.js - text decoration looks not exactly right

This image is from kitchensink, and the problems are :
Line through doesn't exactly at right place (see the left text at top)
When it's italic with background color, the text is a bit out of its background (see the left text at top)
Underline is a bit far from text, or can we adjust its distance?
Thanks.
You're seeing an experimental feature — fabric.IText — that's currently in development. It allows to edit text inline and supports partial formatting.
The problem with line-through is known.
Underline being far probably has to do with stretched text. When I load kitchensink it looks good.
Background and italics is an interesting one. I just checked google docs and there's the same problem there:

practically most used background colors in web design

I'm customizing a color picker's default showing colors which will be used as background colors. I'm wondering if there is a collection of the colors that are particularly useful in practical web design. Like nobody(hopefully) would use #f00 as a 100%-width page's background color while #fff is a universally usable one, there's DO'S and DONT's when it comes to picking background colors. So what are the candidates in your opinion?
I know this could be subjective, but generally I believe there IS a solid set of them.
[edit] : I kinda have an idea to customize the color picker in a logic way, first pick a buch of hues, them for each hue, start from the possible lightest of saturation to the possible heaviest. A bit demenstration:
gray [ #eee, #ccc, #ddd, .... ]
green [ ... .... ... .... ]
blue ....
yellow
brown [
As for a realistic answer, #fff won the race, right? Sometimes you'll see shades of gray, #eee, #eaeaea, and an occ. #000.
If you want to mix things up, I'd recommend checking out http://kuler.adobe.com/ to get an idea for what's popular, but perhaps slightly different. It's fun to experiment with the palettes up there.
I don't think there is a universal standard for picking up colors for your site. It entirely depends on the nature of the site and the kind of users that visit the site.
For eg: it would be nice to give a greenish color for a site that's theme is nature.
Here is a nice site in which you can choose color combinations and get a preview of that in a single click.
Color Scheme Designer
Never choose a color that will distract the user from seeing the actual contents of the site.
If you allow users to select the color then it would be nice to show them a preview of the site with the colors they have chosen.
Contrast is what really matters when choosing background/foreground colours, so they're likely to be very light, or very dark
so you'll need light and dark variants. i'd probably opt for:
light red, orange, yellow, green, blue, indigo, violet
and dark as above
maybe the same for some earthy type tones, browns, greys, etc.
If you like colours like I do, you might visit ColourLovers. They've got some great ways of choosing colours, and colour schemes. The website trends section might be interesting to you.
I personally like schemes where the lighter colour is not pure white. Pure white can be sometimes harsh when reading lots of text.
Creativity is BREAKING the rules.
It is possible that a seemingly bad color combination, if used in right proportions, can actually look good, so there is no such thing as a bad color combination, it also matters on the shades, difference in colors.
Believe it or not, i own a site (www.salvin.in) where user can change the background color to many different choices and it still manages to look good *ahem in most of the cases.
There are a few things that i suggest you to look into:
Color wheel
Color harmonies
Triads and Tetras
Mono chromes (with contrasting shades)
Complimentaries
I find that #000 messes up my eyes. After looking at mainly #FFF pages/applications, then switch to #000, then when I go back to anything else, it take a while for my eyes to adjust. I vote "no" to #000.

Resources