Skip to content

Instantly share code, notes, and snippets.

@ganwell
Created October 9, 2012 11:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganwell/3858061 to your computer and use it in GitHub Desktop.
Save ganwell/3858061 to your computer and use it in GitHub Desktop.
Solarized theme for IPython code mirror editor
from IPython.core.display import HTML
def solarized():
"""Solarized code mirror theme."""
html = """
<style type="text/css">
.cm-s-ipython { background-color: #002b36; color: #839496; }
.cm-s-ipython span.cm-keyword {color: #859900; font-weight: bold;}
.cm-s-ipython span.cm-number {color: #b58900;}
.cm-s-ipython span.cm-operator {color: #268bd2; font-weight: bold;}
.cm-s-ipython span.cm-meta {color: #cb4b16;}
.cm-s-ipython span.cm-comment {color: #586e75; font-style: italic;}
.cm-s-ipython span.cm-string {color: #2aa198;}
.cm-s-ipython span.cm-error {color: #dc322f;}
.cm-s-ipython span.cm-builtin {color: #cb4b16;}
.cm-s-ipython span.cm-variable {color: #839496;}
</style>"""
return HTML(html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment