ColorCodedLyrics Add Name Titles To Colored Lyric Lines

Attempts to automatically title color-coded lyric spans on colorcodedlyrics.com for convenience. May not work on all pages due to small HTML structure variations.

Penulis
orbit-loona
Pemasangan harian
0
Total pemasangan
0
Nilai
0 0 0
Versi
1.1.1
Dibuat
15 Maret 2024
Diperbarui
23 Agustus 2024
Lisensi
MIT
Berlaku untuk

this script is more secondary color processing code than actual main function code 😭

The website colorcodedlyrics.com color codes K-pop lyrics based on who's singing them. This script tries to find the member-color key and grab the information. Then, it iterates over each colored lyric span and checks its color. If the span's color is recognized as corresponding to one of the members/the singer, it sets the span's "title" attribute to the name of the member the color corresponds to.

This script may not work on all colorcodedlyrics.com pages due to small variations in the HTML layouts of pages potentially preventing the script from finding the key or lyrics.

Most of this script is color processing code I copied from one of my other projects, because sometimes the site specifies the key's color in "rgb()" format but colors the lyrics in "#rrggbb" (hex triplet) format, and normalization is needed to compare the colors.