I was having trouble with the sentence "两只饿到眼绿的老鼠正在房梁上打架" because I could not understand the usage of 到 here. After I spent some time thinking I figure the meaning is that the rats were hungry to the extent that their eyes turned green (a metaphor of some sort?) but if that is indeed the case, what would you call this type of word? In English I believe the word "to" used in this way is called a preposition but I haven't seen anything online about the usage of prepositions in Chinese.
You are essentially correct. Here, 到 is a preposition that, depending on context, can represent "to," "(up) until," or "up to."
e.g. 到目前为止 : up until this moment
工作到天亮了 : work until the sky becomes light
从周一到周四 : From Monday to Thursday
In your particular example, there seems to be an implied “的程度" at the end of the descriptor which is omitted, i.e. one can write 两只饿到眼绿的程度的老鼠正在房染上打架, and in order to prevent a sentence from being clunky, this has been omitted since it's clear from context what is being said here.
I like that, "so hungry their eyes were green", haven't heard that before!
2 hungry that eyes green 的 mice just in the room roof-beams fight
Two mice, both so hungry that their eyes were green, were fighting on a roof-beam.
Maybe it should be "饿的眼放绿光". Anyway, 饿到眼绿 means very very hungry.
hungry until eyes green 到 = until so hungry (their) eyes went green
hungry that eyes send out green light
A quick search gave me this answer. Not sure if it is accurate. I can't find a source for "饿的眼放绿光" . I'm sure someone here knows.
Other examples I can think of:
红到发紫 --this is often used to describe someone is very popular
富到流油 -- this is used to describe someone is very rich
In all these cases, 到 can be replaced with 得.
To remember some use cases is a good way to remember how to use the word.