Git Product home page Git Product logo

Comments (7)

jtdaugherty avatar jtdaugherty commented on July 19, 2024 1

One idea I had that would basically just reduce the chances of collision would be to detect when the terminal supports 256 colors and use a larger palette.

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 19, 2024

Right now we use Hashable's hash function to index into the color list. If we can come up with other deterministic choice functions then that will work well.

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 19, 2024

I'm closing this, primarily because we haven't gotten any support requests to fix this, but also because aside from using 256 color support, I'm not sure there's much we can do about this. (I'm also not confident that the proposed heuristics will improve the distribution in a way that would be obviously different from how it is now.)

If anyone has ideas on how to make this better, let's start with a candidate patch and go from there.

from matterhorn.

dpb1 avatar dpb1 commented on July 19, 2024

As you were looking for feedback, I'd love 256 color support! I run TERM='screen-256color' for my IRC clients for just this reason. The UI is fine, but for names, it's nice to have a wider distribution, as you hit 8 in a channel talking way too easily. I realize that adding a "me too" on the end of this isn't super helpful, but this is exactly the solution in other clients I've used when this problem is hit.

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 19, 2024

I've started working on 256-color support for username color assignment on a branch:

https://github.com/matterhorn-chat/matterhorn/tree/feature/username-colors-256

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 19, 2024

From a discussion with @kquick, one of the things we need to do on this branch now is to prune colors that are too dark for the dark built-in theme and too light for the light built-in theme.

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 19, 2024

As of 6f3b8e3, this has now been resolved on develop. The primary changes are:

  • New built-in color themes, builtin:dark256 and builtin:light256, which offer 256-color username colors but are otherwise identical to the light and dark built-in themes, and
  • A command /username-attribute that can be used to determine which attribute name Matterhorn uses to render a given username, in case users want to override that color choice.

from matterhorn.

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.