If more than one card is exiled with Thought Prison, Thought Prison's second ability will trigger whenever a player casts a spell—
with the same mana value as any one of those exiled cards, or
that "shares a color" with any one of those exiled cards.
That is because for the purposes of that ability in this case, the ability gets multiple answers when asking what is the color or mana value of a card exiled with Thought Prison (determining whether an object shares a color or mana value with another doesn't involve "determin[ing] the value of a variable") (C.R. 607.3).
EDIT: Clarification after comment 3 was posted.
EDIT (Jun. 17): Clarification.
EDIT (Dec. 19, 2022): Update terminology.
607.3. If, within a pair of linked abilities, one ability refers to a single object as "the exiled card," "a card exiled with [this card]," or a similar phrase, and the other ability has exiled multiple cards (usually because it was copied), the ability refers to each of the exiled cards. If that ability asks for any information about the exiled card, such as a characteristic or converted mana cost, it gets multiple answers. If these answers are used to determine the value of a variable, the sum of the answers is used. If that ability performs any actions on the exiled card, it performs that action on each exiled card.
I think the natural interpretation is that "it refers to each of the exiled cards" and "it gets multiple answers" in this situation (i.e. spells that share the CMC with either of the exiled cards trigger the damage). The next sentence is for things that can't have multiple values (For example, if it were to deal X damage, where X is the CMC of "the exiled card").
Will the Thought Prison now trigger on either Imprinted cards colors/cmc?
—Lim-Dûl, the Necromancer
That is because for the purposes of that ability in this case, the ability gets multiple answers when asking what is the color or mana value of a card exiled with Thought Prison (determining whether an object shares a color or mana value with another doesn't involve "determin[ing] the value of a variable") (C.R. 607.3).
EDIT: Clarification after comment 3 was posted.
EDIT (Jun. 17): Clarification.
EDIT (Dec. 19, 2022): Update terminology.
I think the natural interpretation is that "it refers to each of the exiled cards" and "it gets multiple answers" in this situation (i.e. spells that share the CMC with either of the exiled cards trigger the damage). The next sentence is for things that can't have multiple values (For example, if it were to deal X damage, where X is the CMC of "the exiled card").
—Lim-Dûl, the Necromancer