mbrea-c/wal-colors.nvim

Color:out function breaks on R, G or B values starting with 0x0

mequidis opened this issue · 1 comments

Color = require"wal-colors.color".Color
print(Color.from_rgb(15, 16, 15):out()))

prints # F10 F instead of #0F100F

This breaks configs with colors having their R, G or B colors starting with 0x0:

" Special
let wallpaper  = "~/bgs/voxel.png"
let background = "#0f1011" " this color breaks wal-colors.nvim
let foreground = "#98cfcf"
let cursor     = "#98cfcf"

" Colors
let color0  = "#0f1011"
let color1  = "#185d64"
let color2  = "#1b686f"
let color3  = "#249060"
let color4  = "#993326"
let color5  = "#b13d2c"
let color6  = "#c84932"
let color7  = "#98cfcf"
let color8  = "#6a9090"
let color9  = "#185d64"
let color10 = "#1b686f"
let color11 = "#249060"
let color12 = "#993326"
let color13 = "#b13d2c"
let color14 = "#c84932"
let color15 = "#98cfcf"

I have fixed the issue in this pull request.

Fixed by #1. Thanks!