Module:MOS mode degrees: Difference between revisions

Ganaram inukshuk (talk | contribs)
Added cell coloring to indicate which cells are perfect intervals (default color), the large size (light yellow), the small size (light blue), or an altered size (light red)
Ganaram inukshuk (talk | contribs)
m Row coloring for perfect intervals now only applies to periods
Line 526: Line 526:
local darkest_vector = p.calculate_mode_degrees(input_mos, darkest_true_mode)
local darkest_vector = p.calculate_mode_degrees(input_mos, darkest_true_mode)
local cell_color_perfect_size = "NONE"
local cell_color_perfect_size = "NONE" -- Only applies for periods, including the root and equave
local cell_color_large_size = "fffff0"
local cell_color_large_size = "fffff0"
local cell_color_small_size = "eaeaff"
local cell_color_small_size = "eaeaff"
Line 535: Line 535:
local cell_colors = {}
local cell_colors = {}
for j = 1, #input_mode_vectors[i] do
for j = 1, #input_mode_vectors[i] do
if input_mode_vectors[i][j] == 0 then
if input_mode_vectors[i][j] == brightest_vector[j] and input_mode_vectors[i][j] == darkest_vector[j] then
table.insert(cell_colors, cell_color_perfect_size)
table.insert(cell_colors, cell_color_perfect_size)
elseif brightest_vector[j] == input_mode_vectors[i][j] then
elseif brightest_vector[j] == input_mode_vectors[i][j] then