Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStefan Kowalski
117 PointsColor of code
Why my code in workspace does have a different color? For instance "class has blue, program has black, comment has green.
2 Answers
Steven Parker
231,236 PointsWhat you are seeing is the result of an editor feature called "syntax highlighting". The editor knows enough about the language to identify certain code elements, and it applies a color to each type to help distinguish them visually.
As you've noticed, keywords are shown in blue, and comments are shown in green. And perhaps you haven't seen it yet, but literal strings are shown in red.
Stefan Kowalski
117 PointsThank you for replay. I've formed probably wrong my question because when I've launched my workspce. I have different colors than Jeremy in Video has. In my workspace class is blue in video class is blue, method is blue I video is read.
Steven Parker
231,236 PointsIt's possible that the specific colors changed as part of an editor upgrade that happened since the video was made.