Answer
$\text{Domain:}\;\{\text{red},\text{blue},\text{green}\}$
$\text{Range:}\;\{\frac{1}{4},\frac{1}{8},\frac{5}{8}\}$
$\text{Yes, this relation is a function.}$
Work Step by Step
The domain of a relation is the set of $x$ values for that function. In this relation, the set of $x$ values is $\{\text{red},\text{blue},\text{green}\}$. The range of a relation is the set of $y$ values for that relation. In this relation the set of $y$ values is $\{\frac{1}{4},\frac{1}{8},\frac{5}{8}\}$. A relation is a function if each $x$ value has only one unique $y$ value. Since there are not elements of the domain that are repeated with different elements of the range, this relation is a function.