Skip to content

Support a 256 colour set in modern terms. #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
envygeeks opened this issue Jan 17, 2012 · 11 comments
Open

Support a 256 colour set in modern terms. #14

envygeeks opened this issue Jan 17, 2012 · 11 comments
Labels
Milestone

Comments

@envygeeks
Copy link

All modern Linux terms support 256 colours (Gnome-Terminal [even though it doesn't advertise it and pretends to only support 8 colours -- and most other terminals provided and supported on GNOME, KDE and XFCE.) I'm asking and offering to help with this problem specifically because on a modern terminal with modern monitor the current colour set is pretty bright and blinding (exp: those blues kill) and some other colours tend to be harder to see unless they are darker (especially if you are using gnome-terminal with a transparent background.)

Coderay can detect colours using tput colors (but on Gnome-Terminal it will report 8 so you should assume 256 colours because it supports it -- read above) it can also grep out TERM for 256 (in the case of multiplexors but they will also output the right colours with tput colors) Anyways the idea is to make things more readable, force your VIM to use 256 colours in a GNOME-Terminal and see what I mean when it changes the default themes line number colours to a dark orange. Example code to prove my point in VIM:

if $COLORTERM == 'gnome-terminal'
  set t_Co=256
endif
@korny
Copy link
Member

korny commented Jan 20, 2012

I plan to use Paint in the future to achieve this. In the best case, I want to use the colors defined in the CSS scheme for this, but we could work on an intermediate solution which adds a 256 default style that is suitable for your cases, too.

What do you think about this?

@envygeeks
Copy link
Author

I'd be more than happy to help implement paint (even though I kinda
dislike Janlelis gems because he spams with Post Install which is
rather annoying >.<) but yeah anything that allows the expansion of
colours or even the customistion of simple options for the interim
would do so that we could adjust colours just a tad when working in
certain situations.

@korny
Copy link
Member

korny commented Jan 20, 2012

In defense of Jan, I know him (we went to the same university) and he's not a spammer ;-) I think he just likes to do things because they are possible.

For me, the current colors work okay, but I also see a lot of room for improvement. However, since you seem to work a lot with CodeRay::Encoders::Terminal, I would be happy to let you choose the colors of the default style :-) Maybe based on your favorite/homegrown VIM highlight config or something.

@korny
Copy link
Member

korny commented Jan 21, 2012

This feature, together with the multiline-inline-diff branch, would make a great 1.1 release :-) Just thinking.

@envygeeks
Copy link
Author

Well if you want some help implementing this (or even help working on
other things you want to do with Coderay so you can do this yourself)
please do hit me up, I am more than willing to fork and work with you
on these features. Just shoot me a private message and I'll send you
off my gtalk and personal email.

@korny
Copy link
Member

korny commented Jan 26, 2012

Jordon Bedwell:

Well if you want some help implementing this (or even help working
on other things you want to do with Coderay so you can do this
yourself) please do hit me up, I am more than willing to fork and
work with you on these features. Just shoot me a private message and
I'll send you off my gtalk and personal email.
Wow, thanks man :) I'm in the process of moving to a new flat, so I
won't have time to chat the next days, but I will get back to you.

Never used gtalk before... kornelius@sofatutor.com should work :)

  • [murphy]

@korny
Copy link
Member

korny commented Mar 31, 2012

Hi Jordon! Do you still want to work on this feature? :)

@envygeeks
Copy link
Author

Yes I would love to help with this feature. We were just talking about this in #pry the other day. I'll start working on it today and see what I can come up with and present it to you so we can get a robust implementation.

@nathany
Copy link
Contributor

nathany commented Oct 27, 2012

There is a ticket in Redmine that is possibly related to this: Let Terminal encoder use CSS styles

With a link to: terminal256.py in the Pygments repo.

Though I'm not sure that they use CSS styles. Pygments has its own definition of Style.

@nathany
Copy link
Contributor

nathany commented Oct 28, 2012

See also, #29.

@korny
Copy link
Member

korny commented Mar 10, 2013

256-color support could be the star feature of 1.2, but I think it should not delay 1.1 (which focusses on new scanners).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants