Changed blue to 0 and red to 1 in SPL