A Vim theme based on hue 202 , a soothing blue of sea and sky. The light version is seagull; the dark, petrel.
Featuring gui (Linux/Windows GVim, MacVim, Neovim), terminal, and true (24-bit) colour support.
seagull | petrel | |
---|---|---|
|
|
Download seagull.vim
and/or petrel.vim
from this repository and place in directory ~/.vim/colors/
(Linux/Mac) or %userprofile%\vimfiles\colors\
(Windows).
For easy management of Vim colour schemes (and other plugins), try a plugin manager. With the Vundle plugin manager, for instance, just add Plugin 'nightsense/seabird'
to the list of plugins in your vimrc
, then run VundleUpdate
. (To automatically keep plugins up to date with Vundle, add vim +VundleUpdate +qall
to a startup script or cron job.)
Add colorscheme seagull
or colorscheme petrel
to your vimrc
.
Or, if you'd like to switch automatically between them based on time of day, add this block (which activates petrel when launching Vim between 8PM and 8AM, seagull otherwise):
if strftime("%H") < 8 || strftime("%H") > 20
colorscheme petrel
else
colorscheme seagull
endif
In order for seagull or petrel to work properly in terminal Vim, the terminal's colours should be set to match those of the active Vim theme.
As of now, this repository only provides one terminal configuration file: Xresources
, which is used by two popular Linux terminals, xterm and urxvt. If you'd like to see a configuration file for another terminal, feel free to make a request.
The base colours were selecting using the hue/saturation/value model of colour definition.
First, all base colours were assigned hue 202.
Second, saturation levels were assigned. The lightest colour, seagrey8, was assigned 0. For the remaining colours, an excerpt of the Fibonacci sequence was applied.
base colour | basic role | hue ° | saturation % |
---|---|---|---|
seagrey1 | regular background (petrel) | 202 | 55 |
seagrey2 | highlighted background (petrel) | 202 | 34 |
seagrey3 | subdued text (petrel) | 202 | 21 |
seagrey4 | regular text (seagull) | 202 | 13 |
seagrey5 | regular text (petrel) | 202 | 8 |
seagrey6 | subdued text (seagull) | 202 | 5 |
seagrey7 | highlighted background (seagull) | 202 | 3 |
seagrey8 | regular background (seagull) | 202 | 0 |
Third, value levels were assigned. seagrey8 was set to 100% value. The remaining colours were assigned values based on contrast ratios with other base colours.
- the 3:1 ratio ensures that subdued text on highlighted background meets the ISO-recommended 'standard minimum' for readable text
- the 4½:1 ratio ensures that regular text on regular background meets the W3C-recommended 'accessible minimum' for readable text
Accent colour hues were selected from around the (30°-divided) colour wheel: hue 202 plus seven of its companions.
colour | hue |
---|---|
red | 352 |
orange | 22 |
yellow | 52 |
green | 112 |
teal | 172 |
blue | 202 |
purple | 262 |
pink | 322 |
The aesthetic aim of seagull included a bright, cheerful palette of accent colours. The contrast ratio of each hue was tuned accordingly. Each colour started with 100% value and saturation; contrast was adjusted by either lowering saturation (to lower contrast) or lowering value (to raise it).
While the ISO-recommended 'standard minimum' contrast ratio for readable text is 3:1, this proved too high for most colours, leading to a relaxed minimum of 2⅔. The two exceptions were red and purple (the highest-contrast hues), for which the full 3:1 ratio was applied.
The seagull accent colours were converted to the petrel theme by reducing saturation of all hues by ⅓, then adjusting value to achieve 4½:1 contrast ratio* (the W3C-recommended 'accessible minimum' for readable text) with the petrel background.
The seabird colour scheme files are generated by modifying those of the flattened colour scheme by Romain Lafourcade, which is in turn derived from the Solarized colour scheme by Ethan Schnoonover.
Colour adjustment was performed with the GIMP colour selection tool. Contrast ratios were calculated with these formulas.
* minimum contrast; actual contrast may be slightly higher (due to discrete jumps in digital colour values)