Just as in English, to avoid repetition, we occasionally use adjectives as nouns.
Do you like the pink teeshirt or the yellow one?
In French, they do this as well:
Tu preferes le teeshirt rose ou le jaune?
Instead of repeating le teeshirt jaune “the yellow t-shirt”, the color becomes the noun- “the yellow one”