dev (formatter): formatted with StyLua utils/

dev-doc
Pocco81 3 years ago
parent 685a90ad9a
commit 69ef80d89d

@ -20,7 +20,7 @@ function M.assert_brightness(color)
local g = M.hex2rgb(string.sub(hex, 3, 4)) local g = M.hex2rgb(string.sub(hex, 3, 4))
local b = M.hex2rgb(string.sub(hex, 5, 6)) local b = M.hex2rgb(string.sub(hex, 5, 6))
if (color_is_bright(tonumber(r), tonumber(g), tonumber(b)) == true) then if color_is_bright(tonumber(r), tonumber(g), tonumber(b)) == true then
return true -- bright return true -- bright
end end

@ -112,7 +112,7 @@ hsluv.xyz_to_rgb = function(tuple)
return { return {
hsluv.from_linear(hsluv.dot_product(hsluv.m[1], tuple)), hsluv.from_linear(hsluv.dot_product(hsluv.m[1], tuple)),
hsluv.from_linear(hsluv.dot_product(hsluv.m[2], tuple)), hsluv.from_linear(hsluv.dot_product(hsluv.m[2], tuple)),
hsluv.from_linear(hsluv.dot_product(hsluv.m[3], tuple)) hsluv.from_linear(hsluv.dot_product(hsluv.m[3], tuple)),
} }
end end
@ -121,7 +121,7 @@ hsluv.rgb_to_xyz = function(tuple)
return { return {
hsluv.dot_product(hsluv.minv[1], rgbl), hsluv.dot_product(hsluv.minv[1], rgbl),
hsluv.dot_product(hsluv.minv[2], rgbl), hsluv.dot_product(hsluv.minv[2], rgbl),
hsluv.dot_product(hsluv.minv[3], rgbl) hsluv.dot_product(hsluv.minv[3], rgbl),
} }
end end
@ -322,12 +322,12 @@ end
hsluv.m = { hsluv.m = {
{ 3.240969941904521, -1.537383177570093, -0.498610760293 }, { 3.240969941904521, -1.537383177570093, -0.498610760293 },
{ -0.96924363628087, 1.87596750150772, 0.041555057407175 }, { -0.96924363628087, 1.87596750150772, 0.041555057407175 },
{0.055630079696993, -0.20397695888897, 1.056971514242878} { 0.055630079696993, -0.20397695888897, 1.056971514242878 },
} }
hsluv.minv = { hsluv.minv = {
{ 0.41239079926595, 0.35758433938387, 0.18048078840183 }, { 0.41239079926595, 0.35758433938387, 0.18048078840183 },
{ 0.21263900587151, 0.71516867876775, 0.072192315360733 }, { 0.21263900587151, 0.71516867876775, 0.072192315360733 },
{0.019330818715591, 0.11919477979462, 0.95053215224966} { 0.019330818715591, 0.11919477979462, 0.95053215224966 },
} }
hsluv.refY = 1.0 hsluv.refY = 1.0
hsluv.refU = 0.19783000664283 hsluv.refU = 0.19783000664283

@ -104,7 +104,7 @@ end
function util.syntax(tbl) function util.syntax(tbl)
for group, colors in pairs(tbl) do for group, colors in pairs(tbl) do
if (type(group) == "number") then if type(group) == "number" then
for inner_group, clrs in pairs(colors) do for inner_group, clrs in pairs(colors) do
util.highlight(inner_group, clrs) util.highlight(inner_group, clrs)
end end

Loading…
Cancel
Save