It looks like it comes from part of the history of Welsh: https://en.wikipedia.org/wiki/Blue%E2%80%93green_distinction_in_language#Celtic
Y Gath Ddu,
I believe the distinction between blue and green in Welsh is fuzzy and not in the same place as in English. I think that 'glas' can be both green and blue and that traditionally they were considered to be different shades of the same colour in Welsh. Probably why grass starts with 'glas'.
I'm only going through the tests right now, and I did put 'glas' in for green which got marked wrong. I believe it may be rare nowadays, but I was nevertheless taught it in an evening class along with 'gwyrdd'.