0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
A simple ruby DSL for writing vim schemes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0

Runtime

>= 0
 Project Readme

Palette Town Gem Version

A ruby tool for generating vim color schemes.

Palette Files

Palette files are just normal Ruby files, so you can use Ruby code however you like. No, really; that's why I made it when there was already joshuaclayton/palette.

To demonstrate this, here's an example file. Please. for the love of God, DO NOT USE THESE COLORS. Seriously, they're hideous.

name 'Kawaii'
author 'Desu Yo'
description 'the most super kawaii theme ever'

main_bg = "00FF00"

hi :Normal, "0000FF", main_bg
hi :LineNr, darker(hi[:Normal][:fg], 10.percent)
hi :String, spin(hi[:Normal][:bg], 90.degrees)
hi :Boolean, :bg => main_bg

Helpers

  • lighter(color, amount) - Increases luminosity of a color by amount.
  • darker(color, amount) - Decreases luminosity of a color by amount.
  • saturate(color, amount) - Increases saturation of a color by amount.
  • desaturate(color, amount) - Decreases saturation of a color by amount.
  • spin(color, amount) - shifts the hue by amount radians.

Monkeypatches

  • Fixnum#degrees - provides a simple expression of degrees, returned in radians
  • Fixnum#percent - provides a simple expression of percent, returned as a decimal

Building a palette file

Once you've written a palette file, you build it into a proper vim theme with the following command:

$ palettetown build file.rb -o file.vim

Planned Features

  • Styles (italic, bold, underline)
  • Automatic console color picking
    • Support for entering the hex values of your 16-color set and using those for matching.