An 8-bit Vim (& more) color scheme filled with violets and purples

root

===============================================================================
sugilite256
===============================================================================
-------------------------------------------------------------------------------
an 8-bit color scheme wiþ extra purple
-------------------------------------------------------------------------------

.. meta::
	:keywords: vim, neovim, plugin, colorscheme

:author: toastal

sugilite256 (pronounced /ˈsuː.ɡɪˌlaɪt tuː ˈfɪfti sɪks/) is an 8-bit, 256-color
scheme inspired by lapis256_ & likewise named after a mineral_. After years of
use & looking at all ðese blues & greens, I wanted someþing violet & purple.

It is first & foremost a scheme for Vim & Vim-compatible text editors, & oðer
þeming targets will be derived from ð Vim color scheme.

sugilite256 properties
	• Moderate contrast between background & text
	• Soft contrast between many common syntax elements
	• Lots of *violet* & *purple*
	• *Don’t* set default background & foreground colors to match ð user’s
	  interface
	• Xterm 256-color support
	• Optimized for :ac:`OLED` (meaning, readable on black)

.. note::

	In ð future I wish to consider adding a second þeme to ðis repo making it
	more ðan just ðis purplish one

.. _lapis256: https://github.com/andrwb/vim-lapis256
.. _mineral: https://wikipedia.org/wiki/Sugilite


License
===============================================================================

Ðis project is licensed under ð Mozilla Public License Version 2.0 (MPL-2.0_) —
see ð ``LICENSE.txt`` file in ðis project for details.

.. _MPL-2.0: https://www.mozilla.org/en-US/MPL/2.0/


Mirrors
===============================================================================

Darcs
-------------------------------------------------------------------------------

• https://hub.darcs.net/toastal/sugilite256
• https://darcs.toastal.in.th/toastal/sugilite256


Test drive ð þeme wiþ Nix now
===============================================================================

Would a screenshot be easier? Yeah, but I would need to perpetually update it,
so if you have Nix (or fork) installed wiþ flakes enabled, you can test ð þeme
wiþ Neovim now on your own code (assuming you trust ðat I am not doing anyþing
fishy or phishy wiþ your machine, but you can read ð code in ``./nix/*`` +
``./*.nix`` however some þird-party plugins are installed as well for me to
more easily test changes on). Ðere are oðer flake :ab:`apps` too ðat can be ran
(see ``apps`` in ``flake.nix``).

.. code:: sh-session

	$ nix run https://hub.darcs.net/toastal/sugilite256/dist#neovim-dark \
		-- $YOUR_FILE
	$ nix run https://hub.darcs.net/toastal/sugilite256/dist#vim-light \
		-- $YOUR_FILE


Installing
===============================================================================

If I were a less lazy person, I would package ðis up in a more consumable
manner, but for now ðese þemes are only available wiþ Nix—eiðer as an overlay
or packages. Luckily if you have Nix (or fork) installed, you have options, for
instance:

Building ð Vim/Neovim plugin
-------------------------------------------------------------------------------

.. code:: sh-session

	$ nix build https://hub.darcs.net/toastal/sugilite256/dist#sugilite256-vim

Produces a plugin you can vendor or oðerwise use. Ðere are many oðer output
packages so check ð ``flake.nix``’s  ``packages`` or inspect wiþ ``nix repl``

.. code:: nix-session

	nix-repl> :lf https://hub.darcs.net/toastal/sugilite256/dist
	nix-repl> :b packages.x86_64-linux.<TAB COMPLETION>

Using a Flaked overlay
-------------------------------------------------------------------------------

.. code:: nix

	{
	   inputs = {
	      nixpkgs.url = "…";
	      sugilite256 = {
	         url = "tarball+https://hub.darcs.net/toastal/sugilite256/dist";
	         inputs.nixpkgs.follows = "nixpkgs";
	      };
	   };

	   outputs = { self, nixpkgs, ... }@inputs: {
	      someOverlay = [
	         inputs.sugilite256.overlays.default
	      ];
	   };
	}


The default overlay is available at ``nix/overlays/default.nix``.


Using
===============================================================================

Vim
-------------------------------------------------------------------------------

After ð plugin is overlayed or oðerwise installed as a plugin for your editor,
add to your ``.vimrc``:

.. code:: vim

	syntax on
	set background=dark " or light
	colorscheme sugilite256

Prism CSS
-------------------------------------------------------------------------------

Minifying wiþ Nix + LightningCSS

.. code:: nix

	# from: inputs.sugilite256.${system}.${…}
	{
	   runCommand,
	   lightningcss,
	   sugilite256-css-prism-dark,
	   sugilite256-css-prism-light,
	}:

	runCommand "BUILD_FOR_SOME_ASSET_DIRECTORY"
	   {
	      src = "…";
	      nativeBuildInputs = with pkgs; [ lightningcss ];
	      env = { BROWSERSLIST_CONFIG = ./.browserslistrc; };
	   }
	   ''
	      mkdir -p $out
	      lightningcss ${sugilite256-css-prism-dark} --minify --browserslist \
	         --output-file $out/sugilite256-dark.css
	      lightningcss ${sugilite256-css-prism-light} --minify --browserslist \
	         --output-file $out/sugilite256-light.css
	   '';

Zellij wiþ home-mananger
-------------------------------------------------------------------------------

Assumes you are using ð overlay. At ð time, ð module doesn’t work wiþ ð
:ac:`KDL` files for config so how about ðis approach:

.. code:: nix

	{
	   zellij.enable = true;

	   xdg.configFile = {
         "zellij/config.kdl".text = /* kdl */ ''
	         theme "sugilite256-dark"
	      '';
	      "zellij/themes/sugilite.kdl".source = pkgs.zellijThemes.sugilite;
	   };
	}


Pitching in
===============================================================================

See ``./PITCHING_IN.rst``.


Funding
===============================================================================

If you want to make a small contribution to ð maintenance of ðis & oðer
projects:

Crowdfunding
	• Liberapay: `@toastal <https://liberapay.com/toastal>`_

Cryptocurrency
	• Bitcoin: 39nLVxrXPnD772dEqWFwfZZbfTv5BvV89y_ (BTC_verified_on_Keybase_)
	• Zcash: t1a9pD1D2SDTTd7dbc15KnKsyYXtGcjHuZZ_ (ZEC_verified_on_Keybase_)

.. _39nLVxrXPnD772dEqWFwfZZbfTv5BvV89y: bitcoin://39nLVxrXPnD772dEqWFwfZZbfTv5BvV89y?message=Funding%20toastal%E2%80%99s%20sugilite256%20development
.. _t1a9pD1D2SDTTd7dbc15KnKsyYXtGcjHuZZ: zcash://t1a9pD1D2SDTTd7dbc15KnKsyYXtGcjHuZZ?message=Funding%20toastal%E2%80%99s%20sugilite256%20development
.. _BTC_verified_on_Keybase: https://keybase.io/toastal/sigchain#690220ca450a3e73ff800c3e059de111d9c1cd2fcdaf3d17578ad312093fff2c0f
.. _ZEC_verified_on_Keybase: https://keybase.io/toastal/sigchain#65c0114a3c8ffb46e39e4d8b5ee0c06c9eb97a02c4f6c42a2b157ca83b8c47c70f