6. In a Cartesian coordinate system, there are 25 non-coincident horizontal and vertical lines, each dyed one of two colors: black or red. Then, the intersection points of black horizontal lines and black vertical lines are dyed black; the intersection points of red horizontal lines and red vertical lines are dyed red; the intersection points of black horizontal lines and red vertical lines are dyed yellow; the intersection points of red horizontal lines and black vertical lines are dyed green. If the ratio of black to red points is $27: 2$, then the ratio of yellow to green points is $\qquad$
6. 1:6 or 6:1.

Let the number of black and red horizontal lines be $x, y$ respectively, and the number of black and red vertical lines be $u, v$ respectively. Then the number of black, red, yellow, and green points are $x u, y v, x v, y u$ respectively.
From the problem, we have
$$
\left\{\begin{array}{l}
x+y+u+v=25 \\
\frac{x u}{y v}=\frac{27}{2} .
\end{array}\right.
$$

From equation (1), we get $2 x u=27 y v \Rightarrow 27 \mid x u$.
Thus, $(x, u)=(3,9),(9,3),(6,9),(9,6)$,
$$
\begin{array}{l}
(9,9),(3,18),(18,3), \\
(9,12),(12,9) .
\end{array}
$$

Therefore, the corresponding $y, v$ satisfy
$$
\begin{array}{l}
\left\{\begin{array} { l } 
{ y v = 2 , } \\
{ y + v = 1 3 }
\end{array} \text { or } \left\{\begin{array} { l } 
{ y v = 4 , } \\
{ y + v = 1 0 }
\end{array} \text { or } \left\{\begin{array}{l}
y v=6, \\
y+v=7
\end{array}\right.\right.\right. \\
\text { or }\left\{\begin{array} { l } 
{ y v = 4 , } \\
{ y + v = 7 }
\end{array} \text { or } \left\{\begin{array}{l}
y v=8, \\
y+v=4 .
\end{array}\right.\right.
\end{array}
$$

Solving, we get $(y, v)=(1,6),(6,1),(2,2)$.
$$
\begin{aligned}
\text { Hence }(x, y, u, v)= & (9,1,9,6),(9,6,9,1), \\
& (3,2,18,2),(18,2,3,2) .
\end{aligned}
$$

Therefore, the ratio of the number of yellow to green points is $x v: y u=6: 1$ or $1: 6$.