01:39 < bridge> ug 01:45 < bridge> since color is being talked about in #general , i've been meaning to ask about how colors work 01:45 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1098031670684303490/Screen_Shot_2023-04-18_at_6.37.43_PM.png 01:46 < bridge> what is that color format up top? I thought for a while it was just decimal but it isn't 01:46 < bridge> also for some reason I used to think you could enter in hex values by doing `player_color_body &E01F1F` but that actually doesn't give you the right color 01:46 < bridge> he said it worked for RGB idk 01:46 < bridge> what works for RGB 01:47 < bridge> The &e01f1f 01:47 < bridge> so &2043030 to get #E01F1F? 01:48 < bridge> that doesn't work 01:54 < bridge> Isn't it just hex to int 01:55 < bridge> Like you can represent hex color codes like this in micropython: 0xFFFFFF 01:55 < bridge> And if you write it like that. You can convert it into a number easily. 02:02 < bridge> by int do you just mean decimal 02:02 < bridge> you can do 0xE01F1F to decimal but you get 14688031 02:02 < bridge> the number the game uses is 49408 02:05 < bridge> Is it perhaps some x-bit? 02:05 < bridge> 16-bit or something 02:06 < bridge> well it doesnt have a consistent # of characters 02:06 < bridge> so i dont really know how to go about figuring out what it is 02:11 < bridge> Did you ask GPT to figure it out? 02:12 < bridge> Also why ask a bot. Isn't it in the code? Shouldn't the math be either in the command player_..._color or when you pick the hex color in the settings? 02:14 < bridge> Somewhere the value gets set 02:14 < bridge> Or it gets converted when you get it 02:14 < bridge> There are no other options 05:37 < bridge> @tela the number is just a decimal representation of the bits of hsl values put together, and to enter hex values I think you use $ instead of & 07:50 < bridge> ah thanks, you're right it's $, don't know where I got & from. Using & does appear to take a value but it's just always gray, dunno what it's expecting there 07:50 < bridge> 07:50 < bridge> > a decimal representation of the bits of hsl values put together 07:50 < bridge> 07:50 < bridge> can you explain a bit more about that? I'd like to find a way to have a hex value, and convert it to this format without using the game 08:25 < bridge> The first one is classic teeworldss colors. 3 byte packed hsl 08:29 < bridge> Going from hex rgb to tw colors you first need to go from rgb to hsl, let's talk about normalized hsl (components out of 1.0), then the value is (h * 256 << 16 + s * 256 << 8 + l * 256) 18:40 < bridge> alignment, packing, ur mom 18:40 < bridge> i hate em all 18:41 < bridge> 18:41 < bridge> i love how llvm makes a c api but doesnt add all you can do there with the cpp api 18:41 < bridge> :okaymaam: 21:33 < bridge> Rust, datafiles, stickers in discord 21:33 < bridge> I hate em all