That five digit code baffled me for the longest time, still not sure what the logic behind it was, first four digits are definitely color based... but the last one? Is that just a random repetition of one of the previous numbers? I could've tried the last one at random, but I thought there'd be a formula to follow, maybe counting gems or books or something... fortunately the answer was in the comments. ;) A walkthrough could've been useful, also seems the text for the cannon is left untranslated? Or is it supposed to be Spanish? Keep it going!
-cd-