flames = [('s', 'y', 'b'), ('l', 'y', 'g'), ('l', 'y', 'g'), ('s', 'r', 'g'),
('l', 'y', 'b'), ('l', 'r', 'b'), ('s', 'y', 'g'), ('l', 'r', 'b'),
('l', 'y', 'g'), ('s', 'y', 'g'), ('l', 'r', 'b'), ('s', 'y', 'g'),
('s', 'r', 'b'), ('s', 'r', 'g'), ('l', 'y', 'b'), ('s', 'r', 'b'),
('l', 'r', 'b'), ('l', 'r', 'b'), ('s', 'y', 'g'), ('l', 'y', 'g'),
('l', 'r', 'g'), ('s', 'y', 'g'), ('l', 'r', 'b'), ('l', 'r', 'b'),
('s', 'y', 'b'), ('s', 'y', 'g'), ('l', 'y', 'b'), ('l', 'y', 'b'),
('l', 'y', 'g'), ('l', 'y', 'b'), ('s', 'y', 'b'), ('l', 'y', 'b'),
('l', 'r', 'b'), ('l', 'y', 'b'), ('l', 'r', 'g'), ('l', 'r', 'b'),
('s', 'r', 'b'), ('l', 'y', 'g'), ('l', 'r', 'g'), ('s', 'r', 'b'),
('l', 'r', 'g'), ('l', 'y', 'g'), ('s', 'y', 'g'), ('l', 'y', 'g'),
('l', 'r', 'b'), ('l', 'r', 'g'), ('l', 'r', 'b'), ('l', 'r', 'b'),
('s', 'y', 'g'), ('s', 'y', 'b'), ('l', 'y', 'g'), ('s', 'y', 'g'),
('l', 'r', 'g'), ('s', 'y', 'g'), ('s', 'r', 'g'), ('s', 'y', 'g'),
('l', 'r', 'b'), ('l', 'r', 'b'), ('l', 'r', 'g'), ('s', 'y', 'g'),
('s', 'y', 'b'), ('s', 'y', 'b'), ('l', 'y', 'g'), ('s', 'r', 'b'),
('l', 'r', 'b'), ('l', 'r', 'b'), ('s', 'y', 'g'), ('l', 'y', 'g'),
('l', 'y', 'g'), ('l', 'r', 'b'), ('l', 'y', 'b'), ('l', 'r', 'g'),
('s', 'r', 'g'), ('l', 'r', 'g'), ('l', 'r', 'b'), ('l', 'r', 'g'),
('l', 'r', 'b'), ('l', 'r', 'g'), ('s', 'y', 'b'), ('l', 'r', 'g'),
('l', 'y', 'g'), ('l', 'r', 'b'), ('l', 'r', 'b'), ('l', 'r', 'b'),
('s', 'y', 'b'), ('s', 'y', 'g'), ('l', 'r', 'g'), ('l', 'r', 'b'),
('l', 'r', 'g'), ('s', 'r', 'g'), ('s', 'y', 'g'), ('l', 'r', 'g'),
('l', 'y', 'g'), ('s', 'y', 'g'), ('l', 'r', 'b'), ('l', 'r', 'b'),
('s', 'y', 'b'), ('l', 'y', 'g'), ('l', 'r', 'b'), ('s', 'y', 'g'),
('l', 'r', 'g'), ('l', 'y', 'b'), ('s', 'y', 'g'), ('l', 'r', 'g'),
('l', 'r', 'g'), ('s', 'y', 'b'), ('l', 'r', 'g'), ('s', 'r', 'b'),
('s', 'y', 'b'), ('s', 'y', 'b'), ('l', 'r', 'b'), ('s', 'r', 'b'),
('l', 'y', 'b'), ('l', 'y', 'b'), ('s', 'y', 'b'), ('l', 'r', 'b'),
('l', 'r', 'g'), ('l', 'r', 'b'), ('l', 'r', 'b'), ('l', 'y', 'g'),
('s', 'y', 'g'), ('s', 'y', 'g'), ('l', 'r', 'g'), ('s', 'r', 'b'),
('l', 'y', 'b'), ('s', 'y', 'b'), ('s', 'y', 'b'), ('s', 'y', 'b'),
('l', 'r', 'b'), ('l', 'y', 'g'), ('l', 'r', 'b'), ('l', 'r', 'g'),
('s', 'r', 'g'), ('s', 'y', 'b'), ('l', 'r', 'g'), ('s', 'y', 'b'),
('l', 'r', 'b'), ('l', 'r', 'g'), ('s', 'y', 'b'), ('s', 'y', 'b'),
('l', 'y', 'g'), ('l', 'r', 'b'), ('l', 'r', 'g'), ('s', 'r', 'g'),
('s', 'y', 'b'), ('l', 'r', 'g'), ('l', 'r', 'b'), ('s', 'r', 'g'),
('l', 'y', 'b'), ('l', 'y', 'g'), ('s', 'r', 'g'), ('s', 'y', 'g')]
s = ''
for f in flames:
s += ''.join('0' if f[i] in ('l', 'y', 'g') else '1' for i in range(len(f)))
points = list(s[j:j+6] for j in range(0, len(s), 6))
This gives you an ordering where both points on either side of the halfway point == '011010'. Leaves pointing at individual flames also seems to indicate this interpretation of '0' and '1' is correct. The halfway point also corresponds to a pretty unique pair of flames that overlap with a kind of heart pattern.
There might be a pattern with the even flame lengths (that I can't quite figure out) but it may also just be a 'residue' of the encoding algorithm.
If you skip the first repeating pattern bit then: 5 bits == base32 == number of white squares on the board. I tried a few base32 encodings based on the position of the key with the ribbons (as hex) and the ordering of chessboard numbering schemes and they seem promising but have no way to determine the correct encoding (and brute force isn't an option ). I also think that this might not be the correct path since base32 is overkill for hex but not enough for much else but the whole range from '00000' to '11111' is represented (though only 30 unique ones are used).
I don't know is what the 17 leaves is all about, everything else (including the poem; 19 verses) is based upon 19, I tried a few theories but not much came of it.
This is where I'm stuck, I'm pretty sure the decoded flames (as two seperate units) need to be recombined in some way that is indicated in the painting but I just can't see it. I kind of think they are points on an elliptic curve but that's just my current working theory based on watching a random unrelated youtube video where I saw 19 and 38 appearing in an elliptical curve algorithm generated by a proof checker...like I said, totally unrelated. Haven't fully explored this elliptical curve theory but also ran out of time to work on this so...
--edit--
There is definitely some more complex pattern beyond the '100' even length pattern which is why I had the flames grouped in lengths of 4, I can almost see it but not quite there yet.