As shown in the above screen shot, the background of code (inside <? ... ?>
) is different from the area outside PHP code. How can I change the background color of PHP code?
For example, if I change the language to Perl, the color is same inside and outside code:
Themes provide foreground, background and a font style (such as bold) to scopes.
A scope is defined in the languages grammar. These are available for each language under "Bundles" -> "Edit Bundles" -> [Language] -> "Language Grammars" -> [Language].
For your question specifically, you could place the cursor on the php line and press Control + Command + T then search for Copy or Show scope:
This shows that the scope you're looking for is called
text.html.php
ormeta.embedded.block.php
. Its probably notsource.php
because that would apply to the entire document.Now all you need to do is modify the theme, you can tell what your current theme is via "View" -> "Themes", Then edit it with: "Bundles" -> "Edit Bundles" -> Themes -> Themes -> [theme]
I suspect you'd like to add or change something like this, though these colors are horrible.