pblop / twitch-chat

Minecraft-Twitch bridge for Fabric!
MIT License
22 stars 14 forks source link

feature request: 24bit color #21

Closed jason-green-io closed 11 months ago

jason-green-io commented 3 years ago

Since I think 1.16, chat messages can be 24bit colours using #AAAAAA or whatever. Not sure if Fabric has that ability when inserting in chat, but the vanilla client does via /tellraw json. You know Twitch provides that info since I see you find the closest basic Minecraft colour match. It would be nice to get the correct colours from Twitch, I sometimes see certain shades of red get converted to grey.

pblop commented 3 years ago

That looks doable! I've been looking at the functions I use to colour messages and at least on the surface that looks like both an improvement and a way to reduce my horrible color translation code. 😆

I'll be chaning that and pushing it in a few weeks, I'm in the process of moving

jason-green-io commented 3 years ago

I think the only issue you'll run into is supporting older versions of client that do not support 24 bit color in chat. You might have to keep your mess around to fall back with < 1.16 .. unless Fabric API takes care of this for you?

pblop commented 3 years ago

Yeah that won't be a problem because I only support the latest version. 😅 I'd have to maintain several codebases if I wanted to support more than one version, and that's too much work!

jason-green-io commented 2 years ago

Have you had a chance to work on this?

pblop commented 2 years ago

Current status of this issue: I tried to change this. Turns out it was harder than I first thought because of the way Twitch gives me the user colours (not all at once, sometimes after I need it so I would need a placeholder, which would kind of break the spirit of 24-bit name colours). So this will probably be added when I upgrade the way I talk to Twitch (I'm using a general-purpose library that's updated very sparingly and doesn't really support Twitch that well, and will be switching to a Twitch-only library that will hopefully allow me to handle stuff like colours better).

jason-green-io commented 2 years ago

Pretty sure with tags enabled, every PRIVMSG has a tag with the color of the user.

https://dev.twitch.tv/docs/irc/tags#privmsg-twitch-tags

On Dec 15, 2021, at 17:35, pblop @.***> wrote:

 Current status of this issue: I tried to do this. Turns out it was harder because of the way Twitch gives me the user colours (not all at once, sometimes after I need it so I would need a placeholder, which would kind of break the spirit of 24-bit name colours). So this will probably be added when I upgrade the way I talk to Twitch (I'm using a general-purpose library that's updated very sparingly and doesn't really support Twitch that well, and will be switching to a Twitch-only library that will hopefully allow me to handle stuff like colours better).

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.