let initColors = () => {
    let subtables = document.querySelectorAll('.list-group-title');

    if (subtables) {
        subtables.forEach((subtable) => {
            if (subtable.className.includes('id_sub_')) {
                let id = subtable.classList.value.split("id_sub_").pop()
                let color_format = new ColorFormat(1, id)
                let lines = subtable.nextElementSibling.querySelectorAll('.item-link.item-content')
                let lines_id = [];
                
                lines.forEach((line) => {
                    let params = new URLSearchParams(line.href);
                    let line_id = params.get('main_line')
                    lines_id.push(line_id)
                })

                color_format.setFormatColor({
                    'lines': lines_id,
                    'subtable_id': id
                }, true);
            }
        })

    }
}