镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Support a 256 colour set in modern terms. #14

Open

Description

@envygeeks

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

Activity

  1. korny commented on Jan 20, 2012

    @korny
    Member

    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?

  2. envygeeks commented on Jan 20, 2012

    @envygeeks
    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.

  3. korny commented on Jan 20, 2012

    @korny
    Member

    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.

  4. korny commented on Jan 21, 2012

    @korny
    Member

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

  5. envygeeks commented on Jan 21, 2012

    @envygeeks
    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.

  6. korny commented on Jan 26, 2012

    @korny
    Member

    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]
  7. korny commented on Mar 31, 2012

    @korny
    Member

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

  8. envygeeks commented on Apr 1, 2012

    @envygeeks
    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.

  9. nathany commented on Oct 27, 2012

    @nathany
    Contributor

    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.

  10. nathany commented on Oct 28, 2012

    @nathany
    Contributor

    See also, #29.

  11. korny commented on Mar 10, 2013

    @korny
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions