nvim icon indicating copy to clipboard operation
nvim copied to clipboard

Fix: string index error causes failed load in kitty

Open mathematicalninja opened this issue 1 month ago • 1 comments

local red_green_string = hex:sub(1, 5)
local blue_value = tonumber(hex:sub(6, 7), 16)

would read the first 5 digits as red-green and the last digit as blue

then

ans[accent] = string.format("%s%.2x", red_green_string, blue_value)

would format the 6th digit to be 2 characters wide.

So the hex_to_rgb would parse a 7-digit hex code and crash

mathematicalninja avatar Nov 26 '25 00:11 mathematicalninja

im sorry if this is a stupid question but isn't the (1, 5) including the hash sign at the start of the hex code, so yes it would be a 7 char hex code: #XXXXXX?

comfysage avatar Dec 07 '25 08:12 comfysage