What does each color in a text editor represent?
Asked by
Cowbox (
5)
August 28th, 2008
I know this is truly a dumb question, but I can’t seem to find any sort of FAQ or whatever on any site. I’m just starting to learn HTML and CSS and I’m using a text editor (Notepad++). Now text editors like notepad++ and textwrangler all colorize the code so it is easily recognizeable, is there a specific color code/legend for each editor, or is it universal (and if so…is there a link that tells me what each color represents).
Observing members:
0
Composing members:
0
5 Answers
Nope, each editor uses a different scheme. It’s quite easy though. For example, in HTML, you mostly have the tags highlighted, with the attributes in a different colour, etc.
In fact, in my editor (Bluefish), I can set the colours and fonts myself for different things, which in fact I did to be easy on the eyes on a black background.
(Why would you need to know what it represents btw?)
The color coding should become intuitive as you learn HTML/CSS. Numbers usually get one color, elements get another, and so on. as @Vincentt said, there is no reason to why the default color scheme is the way it is…
If you want to know/set the colors for various parts of the language(s), I would recommend sitting in front of the app’s preferences and examining them yourself.
W3Schools.com is a good reference to cross your app settings with.
@Vince I’m sure I’ve probably asked before elsewhere, but that is a lovely custom setting. Could I get a config file for it or something? I don’t use Bluefish but if I could port it over to the editors I do use, that would be great :)
@Skyrail – sure, I’ve ported it from another thing for some OS X editor but I’m not sure what that was called again (if anyone remembers, do tell :)).
I’ve pasted the lines of my configuration file that define colours here: http://paster.dazjorz.com/?p=3472
(To all using Bluefish: I’d post my whole configuration file, but since I use an in-development version of Bluefish that’s probably not of too much use)
Edit: Ah, I found the original theme. It’s the Monokai colour theme for TextMate :)
Thank you very much, I’ll hve to bookmark it and boot into linux later and fiddle around with Gedit, thanks :)
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.