Skip to main content

Easily create a Sublime text Color Scheme with as little as six lines of code

Project description

SublimeScheme allows you to easily create a Sublime text Color Scheme with a minimum of six lines of code.

Installation

pip install sublimescheme

Modules

Generate

Contains a class Make that takes two arguments (Theme name) and (Author's name)

Make has six methods which are:

  • start() –> This generates the xml header.

  • head() –> This generates the basic and most important features of your theme. e.g. foreground, background, caret, invisibles, line highlight, selection, find highlight, find highlight foreground, selection border and stack guide color. These are optional parameters too.

  • body() –> This is completely optional and is the main area for your color scheme customization. You can add as many body methods as possible. If none is given, you will have a slighly customized theme similar to Python's IDLE theme.

  • complete() –> This completes the theme.

  • readme() –> Although completely optional, it generates a README.md file and this is useful if you want to publish it.

  • package() –> Although completely optional, it creates a packages.json file which is useful if you want to share your theme on the Package control website

Example1

from sublimescheme.generate import *                #or
from sublimescheme.generate import Make

sample = Make("Mytheme", "Author")

sample.start()
sample.head(fg="#000", bg="#FFFFFF", ct="#F00")

# Optional and creates a Ruby highlighter for numbers
sample.body('Ruby: Numbers', 'constant.numeric.ruby', fs='italic', fg='#f0f', bg='#0ff')

sample.complete()
sample.readme("github.com/name/themename", "name@email.com")
make.package("github.com/name/themename", "name@email.com")

Result1

It will generate a python IDLE lookalike with an extra Ruby number highlighter.

Scopes

The Scopes module has 162 methods for showing several programming language scopes. The most important of all is the scopes method which lists all the 161 programming language supported. You can also view all the scopes directly on Github. You can then call your desired programming language name to see all the syntax highlight scopes it supports.

Example2

from sublimescheme.scopes import *          #or
from sublimescheme.scopes import scopes

print("all scopes")
scopes()

print("C++ Scopes")
cpp()

Result2

all scopes
Scope Name: scope
=================
Actionscript: source.actionscript
Active4D: source.active4d
Active4D_Html: text.html.strict.active4d
Active4D_Ini: text.active4d-ini
Active4D_Library: source.active4d.library
Ada: source.ada

.... etc ......


C++ scopes
C++
===
Scope name: source.c++

C++
entity.name.function.c
keyword.control.c++
keyword.operator.c++
keyword.operator.cast.c++
meta.function.constructor.c++
meta.function.destructor.c++
meta.function.destructor.prototype.c++

..... etc ......

Using locally

If you just want to use it locally, copy your generated .tmTheme into the sublime text packages

Packages –> Color Scheme - Default.

You will then be able to use it by going to:

Preferences –> Color Scheme - Default –> Themename

Acknowledgements

I was inspired to write this package after creating my own Sublime text color scheme called Wildlife. It was a really tedious and energy drenching job but thank God this is now available for anyone and makes things easier to use.

All glory belongs to God for helping me in completing this. Without him, this couldn’t have been written by me.

Contact

If further information or if help is needed, feel free to contact me on my email at taiwo.kareem36@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

Sublimescheme-1.0.6.zip (40.9 kB view details)

Uploaded Source

Sublimescheme-1.0.6.tar.gz (37.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

Sublimescheme-1.0.6.win32.exe (234.1 kB view details)

Uploaded Source

Sublimescheme-1.0.6.linux-x86_64.tar.gz (86.0 kB view details)

Uploaded Source

Sublimescheme-1.0.6-1.src.rpm (46.4 kB view details)

Uploaded Source

Sublimescheme-1.0.6-1.noarch.rpm (80.4 kB view details)

Uploaded Source

File details

Details for the file Sublimescheme-1.0.6.zip.

File metadata

  • Download URL: Sublimescheme-1.0.6.zip
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Sublimescheme-1.0.6.zip
Algorithm Hash digest
SHA256 4ad82cc063771cf56e6bcaeaf07cf0922d8e921d4d8a29f2916fd7e6b16fd30d
MD5 436ccec462460929e2ef027bfffef2f3
BLAKE2b-256 b512f1fc474c29770b7b6564c7b4fc0981490d1a0146c1ea0471d6f10186a752

See more details on using hashes here.

File details

Details for the file Sublimescheme-1.0.6.tar.gz.

File metadata

  • Download URL: Sublimescheme-1.0.6.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Sublimescheme-1.0.6.tar.gz
Algorithm Hash digest
SHA256 b2389434effc2104cf6b3f9a843c0cfad851d736396a090d3e868d46861299f0
MD5 76d8cb47fe70da40bd6b3b1b4eb6d4ad
BLAKE2b-256 9fd52c516353f5d69d6cba6c409d2b2fa3f857a6aaa33d060c6ba6f86773fd56

See more details on using hashes here.

File details

Details for the file Sublimescheme-1.0.6.win32.exe.

File metadata

File hashes

Hashes for Sublimescheme-1.0.6.win32.exe
Algorithm Hash digest
SHA256 349f78eaec21c5dfa5389710bebed9809a2b398c624ef61f7089206d70ab9642
MD5 0fce3363c97f73186b01788a0a3d1747
BLAKE2b-256 b47ad4ec9ade29db6267370d7758a0c2a448cff464ec206ab9d63fef8c18d2ed

See more details on using hashes here.

File details

Details for the file Sublimescheme-1.0.6.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for Sublimescheme-1.0.6.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 21849799b792ffef01446733d43943f59d652b0952fdcd915044843ad1462faf
MD5 1fa06e7d49d5b91ebad614fcbd991f1a
BLAKE2b-256 9595cacf5bd87d6582ab95fafb02fb5890615c9edb459cf77b2c99410553d44a

See more details on using hashes here.

File details

Details for the file Sublimescheme-1.0.6-1.src.rpm.

File metadata

File hashes

Hashes for Sublimescheme-1.0.6-1.src.rpm
Algorithm Hash digest
SHA256 9cb203c3c2569f8720964bc6a2cffe284c4b57c8a7b6d7d68e5ce75d08755a98
MD5 e07453a64d916292e012cc5131d46a87
BLAKE2b-256 2aee46674d696548bd072a302702ebc6bb1919fe4c6af87240675c04ddb558b8

See more details on using hashes here.

File details

Details for the file Sublimescheme-1.0.6-1.noarch.rpm.

File metadata

File hashes

Hashes for Sublimescheme-1.0.6-1.noarch.rpm
Algorithm Hash digest
SHA256 f57b00d894b782fb2db1b975c2ef4629dff6c9184a7b3def7aac7b4554fc9150
MD5 42b4e438da2725073a5b2f36f4fefeeb
BLAKE2b-256 0dac5409d2a54d17829395542480ce806e26f42952025b56de093f2ecf0a8269

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page