diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -82,18 +82,21 @@ return tinycolor(`#${color}`).isDark(); } -const selectedThreadColors = [ - 'B8753D', - 'C85000', - 'AA4B4B', - '4B87AA', - '648CAA', - '57697F', - '6D49AB', - '00A591', - '008F83', - '575757', -]; +const selectedThreadColorsObj = { + 'B8753D': 1, + 'C85000': 2, + 'AA4B4B': 3, + '4B87AA': 4, + '648CAA': 5, + '57697F': 6, + '6D49AB': 7, + '00A591': 8, + '008F83': 9, + '575757': 10, +}; + +const selectedThreadColors = Object.keys(selectedThreadColorsObj); +export type SelectedThreadColors = $Keys; function generateRandomColor(): string { return selectedThreadColors[