isaacs / github

Just a place to track issues and feature requests that I have for github
2.21k stars 129 forks source link

Question: in GitHub, what is the color scheme used to syntax highlight PHP? #922

Closed u01jmg3 closed 7 years ago

u01jmg3 commented 7 years ago

For example:

<?php
    /**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \Exception               $exception
     * @return \Illuminate\Http\Response
     */

    public function render($request, Exception $exception)
    {
        if ($exception instanceof SomeException) {
            // return an HTTP response describing the exception...
        }

        return parent::render($request, $exception);
    }

z3t0 commented 7 years ago

I think its just unofficially called GitHub color scheme

https://packagecontrol.io/packages/Github%20Color%20Theme https://atom.io/themes/atom-github-theme

Search "github" on https://github.com/mbadolato/iTerm2-Color-Schemes#screenshots

cirosantilli commented 7 years ago

https://help.github.com/articles/creating-and-highlighting-code-blocks/ says:

We use Linguist to perform language detection and syntax highlighting.

Then have a look into linguist if they have the CSS stylesheets.

u01jmg3 commented 7 years ago

Thank you both

Mottie commented 7 years ago

GitHub syntax highlighting is performed by GitHub's own PrettyLights syntax highlighter (not released). They do provide a PrettyLights syntax theme generator which produces:

To see which languages are actually supported, check out the linguist languages.yml file.