First, you have done the chi-squared test correctly: With Observed frequencies $X = (10, 20)$ for (Agree, Disagree),
and Expected frequencies $E = (7.5, 22.5),$ I get the chi-squared GOF statistic
to be $Q = 1.11.$ This is far below the 5% critical value 3.84 (with 1 degree of freedom). So you cannot reject the null hypothesis of choosing colors at random.
Second, with goodness-of-fit (GOF) tests, one must be very careful in interpreting
'failure to reject' to mean that $H_0$ is the truth. It may merely mean that
you have insufficient data to put $H_0$ in doubt.
Third, especially at relatively small sample sizes, results of GOF tests
are extremely sensitive to the number of subjects. If you had
60 agreements and 120 disagreements among 180 subjects (the same ratio as 10 agreements among 30), then you would have expected counts $E =(45, 135)$ and $Q = 6.67 > 3.84,$ so you would easily
reject $H_0.$
This is why bar charts, often used to display categorical
data, should always show counts (not relative frequencies); relative
frequency bar charts for your $X = (10, 20)$ and for the significantly
nonrandom $X = (60, 120)$ would be completely indistinguishable.
Last, perhaps 95% confidence intervals for the proportion of agreements in
these two cases would put the situation in perspective.
For $Y = 10$ agreements in $n = 30,$ you'd have $\hat p = 10/30 = 1/4.$
An Agresti-style 95% CI for the true proportion $p$ of agreements is of
the form $\tilde p \pm 1.96\sqrt{\tilde p(1-\tilde p)/(n+4)},$ where $\tilde p = (Y+2)/(n+4) = (10+2)/(30 + 4) = 0.3529412.$ The result is $(0.192, 0.514),$ which
includes your hypothetical $p = 1/4.$
By contrast, For $Y = 60$ agreements in $n = 180$ the 95% Agresti CI
would be $(0.269, 0.405),$ which does not include the hypothetical $p = 1/4.$
Notes: (1) If you are not familiar with Agresti-Coull CIs you can read about
them in on the Wikipedia or (with more technical detail) NIST Internet sites.
They have been shown to have more accurate coverage probabilities than
CIs based just on $\hat p = Y/n.$ (2) I have never been great at proofreading,
but this post is brought to you courtesy of the entire flu-remedy aisle at the local
pharmacy. Please check all computations and leave a Comment if something
doesn't seem right.