[IPython-dev] [IPython-User] changing color theme for paired brackets in notebook

Simon Cropper simoncropper at fossworkflowguides.com
Mon May 26 19:55:26 EDT 2014


Hi Guys,

I was thinking. It would also be good to post your final css file to 
mail list or put a copy on the website so other colour blind people can 
use the resource.

A logical spot in my mind would be here...
http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/Customization/Index.ipynb

On 27/05/14 02:51, Matthias BUSSONNIER wrote:
> Hi Jean-François,
>
> Le 26 mai 2014 à 15:41, Jean-Francois.Moulin at hzg.de
> <mailto:Jean-Francois.Moulin at hzg.de> a écrit :
>
>>
>> Hi!
>>
>> could anyone point me to a way to tune the color scheme of the ipython
>> notebook? In particular I want to change the color used to highlight
>> paired brackets when the cursor is on one of them (On my machine and
>> with my light colorblindness, the color used is almost
>> indistinguishable from the background)
>
> Is this the only color you wish to override or do you want a more custom
> theme ?
> If the first one you can just create a custom css file, the second one
> you might want to rebuild the full IPython css theme.
>
> In both cases, put a css file in your ipython profile, one
> static/custom/custom/custom.css
>
> for me ~/.ipython/profile_default/static/custom/custom.css
> it should already exist and have a comment that look like
>
> /*
> Placeholder for custom user CSS
>
> mainly to be overridden in profile/static/custom/custom.css
>
> This will always be an empty file in IPython
> */
>
> According to codemirror Doc [1] you can style the bracket by targeting
> the following class :
>
> CodeMirror-matchingbracket
>
>
> which mean that the following should work :
>
> div.CodeMirror span.CodeMirror-matchingbracket {
>      color:red;
> }
>
> use any color or style you like.
>
> you can also use any code mirror predefined style if you prefer [2], but
> it might require a little more of tweaking.
> Here [3] are a few full theme for IPython notebook.
>
> Cheers,
>
> --
> Matthias
>
>
>
> [1] : http://codemirror.net/doc/manual.html#class_CodeMirror_matchingbracket
> [2] : http://codemirror.net/demo/theme.html
> [3] : https://github.com/nsonnad/base16-ipython-notebook
>
>
>
>>
>> Many thanks in advance
>> JF
>> Helmholtz-Zentrum Geesthacht
>> Zentrum für Material- und Küstenforschung GmbH
>> Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany
>>
>> Geschäftsführer/Board of Management: Prof. Dr. Wolfgang Kaysser,
>> Dipl.-Ing. Michael Ganß
>> Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board:
>> MinDirig Wilfried Kraus
>> Amtsgericht Lübeck HRB 285 GE (Register Court)
>> Internet: http://www.hzg.de
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User at scipy.org <mailto:IPython-User at scipy.org>
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>


-- 
Cheers Simon

    Simon Cropper - Open Content Creator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages           http://www.fossworkflowguides.com/gis
    bash / Python    http://www.fossworkflowguides.com/scripting



More information about the IPython-dev mailing list