This commit is contained in:
Mikayla Fischler
2024-03-25 10:11:35 -04:00
parent 55e4e5a68b
commit b94c89f4ec
8 changed files with 23 additions and 19 deletions

View File

@@ -45,7 +45,7 @@ local RIGHT = core.ALIGN.RIGHT
local changes = {
{ "v1.2.4", { "Added temperature scale options" } },
{ "v1.2.12", { "Added main UI theme", "Added front panel UI theme", "Added color accessibility modes" } },
{ "v1.3.3", { "Added blue indicators color mode" } }
{ "v1.3.3", { "Added standard with black off state color mode", "Added blue indicator color modes" } }
}
---@class crd_configurator

View File

@@ -88,19 +88,19 @@ style.theme = smooth_stone
---@param fp FP_THEME front panel theme
---@param color_mode COLOR_MODE the color mode to use
function style.set_themes(main, fp, color_mode)
local colorblind = not (color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.STD_ON_BLACK)
local black_ind_off = color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.BLUE_IND
local colorblind = color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.STD_ON_BLACK
local gray_ind_off = color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.BLUE_IND
style.ind_bkg = colors.gray
style.fp_ind_bkg = util.trinary(black_ind_off, colors.black, colors.gray)
style.ind_hi_box_bg = util.trinary(black_ind_off, colors.black, colors.gray)
style.fp_ind_bkg = util.trinary(gray_ind_off, colors.gray, colors.black)
style.ind_hi_box_bg = util.trinary(gray_ind_off, colors.gray, colors.black)
if main == themes.UI_THEME.SMOOTH_STONE then
style.theme = smooth_stone
style.ind_bkg = util.trinary(black_ind_off, colors.black, colors.gray)
style.ind_bkg = util.trinary(gray_ind_off, colors.gray, colors.black)
elseif main == themes.UI_THEME.DEEPSLATE then
style.theme = deepslate
style.ind_hi_box_bg = util.trinary(black_ind_off, colors.black, colors.lightGray)
style.ind_hi_box_bg = util.trinary(gray_ind_off, colors.lightGray, colors.black)
end
style.colorblind = colorblind