2012-07-30 12:11:16 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2012-02-26 16:22:04 +01:00
|
|
|
|
|
|
|
"""
|
2012-07-30 12:11:16 +02:00
|
|
|
solarized256
|
|
|
|
------------
|
2012-02-26 16:22:04 +01:00
|
|
|
|
2012-07-30 12:11:16 +02:00
|
|
|
A Pygments style inspired by Solarized's 256 color mode.
|
2012-02-26 16:22:04 +01:00
|
|
|
|
2012-07-30 12:11:16 +02:00
|
|
|
:copyright: (c) 2011 by Hank Gay, (c) 2012 by John Mastro.
|
|
|
|
:license: BSD, see LICENSE for more details.
|
|
|
|
"""
|
2012-02-26 16:22:04 +01:00
|
|
|
|
2012-07-30 12:11:16 +02:00
|
|
|
from pygments.style import Style
|
|
|
|
from pygments.token import Token, Comment, Name, Keyword, Generic, Number, \
|
|
|
|
Operator, String
|
|
|
|
|
|
|
|
BASE03 = "#1c1c1c"
|
|
|
|
BASE02 = "#262626"
|
|
|
|
BASE01 = "#4e4e4e"
|
|
|
|
BASE00 = "#585858"
|
|
|
|
BASE0 = "#808080"
|
|
|
|
BASE1 = "#8a8a8a"
|
|
|
|
BASE2 = "#d7d7af"
|
|
|
|
BASE3 = "#ffffd7"
|
|
|
|
YELLOW = "#af8700"
|
|
|
|
ORANGE = "#d75f00"
|
|
|
|
RED = "#af0000"
|
|
|
|
MAGENTA = "#af005f"
|
|
|
|
VIOLET = "#5f5faf"
|
|
|
|
BLUE = "#0087ff"
|
|
|
|
CYAN = "#00afaf"
|
|
|
|
GREEN = "#5f8700"
|
|
|
|
|
|
|
|
|
|
|
|
class Solarized256Style(Style):
|
2012-02-26 16:22:04 +01:00
|
|
|
background_color = BASE03
|
|
|
|
styles = {
|
|
|
|
Keyword: GREEN,
|
|
|
|
Keyword.Constant: ORANGE,
|
|
|
|
Keyword.Declaration: BLUE,
|
2012-07-30 12:11:16 +02:00
|
|
|
Keyword.Namespace: ORANGE,
|
2012-02-26 16:22:04 +01:00
|
|
|
#Keyword.Pseudo
|
|
|
|
Keyword.Reserved: BLUE,
|
|
|
|
Keyword.Type: RED,
|
|
|
|
|
|
|
|
#Name
|
|
|
|
Name.Attribute: BASE1,
|
2012-07-30 12:11:16 +02:00
|
|
|
Name.Builtin: BLUE,
|
2012-02-26 16:22:04 +01:00
|
|
|
Name.Builtin.Pseudo: BLUE,
|
|
|
|
Name.Class: BLUE,
|
|
|
|
Name.Constant: ORANGE,
|
|
|
|
Name.Decorator: BLUE,
|
|
|
|
Name.Entity: ORANGE,
|
2012-07-30 12:11:16 +02:00
|
|
|
Name.Exception: YELLOW,
|
2012-02-26 16:22:04 +01:00
|
|
|
Name.Function: BLUE,
|
|
|
|
#Name.Label
|
|
|
|
#Name.Namespace
|
|
|
|
#Name.Other
|
|
|
|
Name.Tag: BLUE,
|
|
|
|
Name.Variable: BLUE,
|
|
|
|
#Name.Variable.Class
|
|
|
|
#Name.Variable.Global
|
|
|
|
#Name.Variable.Instance
|
|
|
|
|
|
|
|
#Literal
|
|
|
|
#Literal.Date
|
|
|
|
String: CYAN,
|
|
|
|
String.Backtick: BASE01,
|
|
|
|
String.Char: CYAN,
|
2012-07-30 12:11:16 +02:00
|
|
|
String.Doc: CYAN,
|
2012-02-26 16:22:04 +01:00
|
|
|
#String.Double
|
2012-07-30 12:11:16 +02:00
|
|
|
String.Escape: RED,
|
|
|
|
String.Heredoc: CYAN,
|
2012-02-26 16:22:04 +01:00
|
|
|
#String.Interpol
|
|
|
|
#String.Other
|
|
|
|
String.Regex: RED,
|
|
|
|
#String.Single
|
|
|
|
#String.Symbol
|
|
|
|
Number: CYAN,
|
|
|
|
#Number.Float
|
|
|
|
#Number.Hex
|
|
|
|
#Number.Integer
|
|
|
|
#Number.Integer.Long
|
|
|
|
#Number.Oct
|
|
|
|
|
2012-07-30 12:11:16 +02:00
|
|
|
Operator: BASE1,
|
|
|
|
Operator.Word: GREEN,
|
2012-02-26 16:22:04 +01:00
|
|
|
|
|
|
|
#Punctuation: ORANGE,
|
|
|
|
|
|
|
|
Comment: BASE01,
|
|
|
|
#Comment.Multiline
|
|
|
|
Comment.Preproc: GREEN,
|
|
|
|
#Comment.Single
|
|
|
|
Comment.Special: GREEN,
|
|
|
|
|
|
|
|
#Generic
|
|
|
|
Generic.Deleted: CYAN,
|
|
|
|
Generic.Emph: 'italic',
|
|
|
|
Generic.Error: RED,
|
|
|
|
Generic.Heading: ORANGE,
|
|
|
|
Generic.Inserted: GREEN,
|
|
|
|
#Generic.Output
|
|
|
|
#Generic.Prompt
|
|
|
|
Generic.Strong: 'bold',
|
|
|
|
Generic.Subheading: ORANGE,
|
|
|
|
#Generic.Traceback
|
|
|
|
|
|
|
|
Token: BASE1,
|
|
|
|
Token.Other: ORANGE,
|
|
|
|
}
|