GithubHelp home page GithubHelp logo

vthriller / urxvt-split-palettes Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 112 KB

Remaps colors, enabling separate color palettes for foreground and background.

License: GNU General Public License v3.0

rxvt-unicode urxvt

urxvt-split-palettes's Introduction

split-palettes

Remaps colors 0—15 onto any of 256 colors, enabling separate color palettes for foreground and background.

Why?

Sometimes developers don't bother supporting neither theming nor NO_COLOR and just assume that everybody's obsessed with k001h4x0r dark themes, leaving me with white-on-white nonsense. Setting different colors for foreground and background color 7 allows me to have reasonably high-contrast text for both white-on-default and black-on-explicit-white color schemes.

Another example is default color scheme for vim. Sure, I might just tweak it, but I'm too lazy when it comes to not only modifying it, but also distributing configs onto various remote servers and dealing with occasionally missing terminfo for rxvt-unicode-256color. By having separate colors for background and foreground, I don't have to deal with conflicts between syntax highlighter and vimdiff, or search highlighing looking like vomit—all without configuring vim on any machine!

Limitations

Only supports mapping within the 8-bit lookup table. 216-color RGB cube + 24 grayscale color palette is rather limited, but if you're really bothered, you can try massaging colors using urxvt-xresources-256.

Usage

Copy screen-palettes to $HOME/.urxvt/ext.

In .Xdefaults:

URxvt.perl-ext-common: ...,split-palettes,...

! set different colors for foreground white and background white
! supported values:
! "c123", where each number in the range 0—5 represents R, G, B values of colors from the 6×6×6 cube (colors 16—231)
! "g1"—"g24", selects one of grayscale colors (from the range 232—255)
! "123" replaces color 7 (as in "\033[37m") with color 123 (as in "\033[38;5;123m")
URxvt.split-palettes.fg7: g12
URxvt.split-palettes.bg7: c555

! same for yellow:
URxvt.split-palettes.fg3: c310
URxvt.split-palettes.bg3: c551

urxvt-split-palettes's People

Contributors

vthriller avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.