Giter Club home page Giter Club logo

Comments (10)

cosmos72 avatar cosmos72 commented on August 29, 2024

Hello @Lassebq,
this happens for both foreground and background colors, or only for one of them (and in case, which) ?

from twin.

Lassebq avatar Lassebq commented on August 29, 2024

Both foreground and background.

from twin.

Lassebq avatar Lassebq commented on August 29, 2024

Also happens when running inside of graphical environment, so it's not specific to TTY

from twin.

cosmos72 avatar cosmos72 commented on August 29, 2024

Hmm, any chance that by "bright versions of 4-bit color palette" you mean the escape sequences
ESC [ 90 m ... ESC [ 97 m for foreground colors, and ESC [ 100 m ... ESC [ 107 m for background colors?

Twin currently does not support them, and instead uses ESC [ 1 m i.e. "bold or high intensity" to enable bright foreground colors, and ESC [ 5 m i.e. "blink" to enable bright background colors.

Anyway, it makes sense to also support ESC [ 90 m ... ESC [ 97 m and ESC [ 100 m ... ESC [ 107 m - I'll try to implement them if I have time.

from twin.

Lassebq avatar Lassebq commented on August 29, 2024

Yes, that's the sequences.

from twin.

cosmos72 avatar cosmos72 commented on August 29, 2024

Implemented in commit 436e6e5

from twin.

Lassebq avatar Lassebq commented on August 29, 2024

image
Still no colors. Running latest git commit.

from twin.

Lassebq avatar Lassebq commented on August 29, 2024

image
No colors in a graphical environment either.

from twin.

cosmos72 avatar cosmos72 commented on August 29, 2024

neofetch first draws a line containing normal intensity colors - visible in the sceenshot above - using ESC[40m ... ESC[47m.
Then it draws another line exactly under it, containing bright colors using ESC[48;5;8m ... ESC[48;5;15m
You can check it yourself by redirecting neofetch output to a file.

Twin does not support the 8-bit palette color escape sequences ESC[48;5;<N>m
nor the 24-bit truecolor escape sequences ESC[48;2;<R>;<G>;<B>m
(see https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
and https://en.wikipedia.org/wiki/ANSI_escape_code#24-bit for reference)
although it could in theory support at least the sequences ESC[48;5;0m ... ESC[48;5;15m
because they are supposed to be simply the basic 4-bit colors followed by their bright versions.

from twin.

cosmos72 avatar cosmos72 commented on August 29, 2024

I have implemented minimal support for ESC[38;5;<N>m (set foreground color, 8-bit palette)
and ESC[48;5;<N>m (set background color, 8-bit palette).

The only supported values of <N> are 0..15, since they correspond to the same 4-bit palette that can be accessed with older escape sequences.

Higher values of <N> require an 8-bit color palette, which twin currently does not support.

Neofetch now shows bright colors too:
image

from twin.

Related Issues (20)

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.