\documentclass[12pt]{article}

\usepackage{pstricks}
\usepackage{amsmath,amsfonts,tikz}

% Put these before fancyhdr lest the headers and footers be the wrong length.
\textwidth = 6.5in   % 1in margins all around.
\hoffset = 0in       % These keep left margins at 1in.
\oddsidemargin = 0in
% So that there is one-half inch at top and bottom.
% See Math Into LaTeX, p. 260.
\topmargin = 0pt
\voffset = -0.5in
\textheight = 8.85in

\usepackage{fancyhdr}
\pagestyle{fancy}

\lhead{Mathematics and Digital Art}
\chead{}
\rhead{7 February 2017}
\lfoot{}
\cfoot{}
\rfoot{Quiz 1}

\renewcommand{\headrulewidth}{0pt}

\def\dint{\displaystyle\int}

\parskip=\bigskipamount
\parindent=0pt

\def\banner#1{\hrule\begin{center}{\sc #1}\end{center}\bigskip\hrule}

\def\reals{{\mathbb R}}
\def\nat{{\mathbb N}}

\begin{document}

\begin{enumerate}
\item Convert \#D8E7AF to integer RGB values and real RGB values.  Round RGB values to three decimal places.

\vskip 1in
\bigskip
\ \hskip1in Integer:\hskip 2in Real:\hskip4in\ \ 
\bigskip

\item Convert $(200,93,249)$ to hexadecimal and real RGB values.  Round as before.

\vskip 1in

\bigskip
\ \hskip1in Hexadecimal:\hskip 2in Real:\hskip4in\ \ 

\bigskip

\def\ran{\hbox{random()}}

\item You have a color represented by $(0.6\times\ran,\ \ran,\ 1)$.  Circle all colors which are possible. (Assume that \ran\ can return both $0$ and $1.$)

\def\s{\ \ \ \ \ \ \  }
$$\hbox{R\s G\s B\s C\s M\s Y\s K\s W}$$

\bigskip

\vskip 0.5in

\item You have a color represented by $(1,\ 0.5\times\ran,\ b\times\ran),$ and $0\le b\le 1.$ The only information you know is that you {\bf cannot} make magenta with this formula. Circle all statements which {\em must} be true.  There may be more than one!
\begin{enumerate}
\item $b$ cannot be $0.$

\item $b$ cannot be $1.$

\item You cannot make black.

\item You cannot make white.
\end{enumerate}

\eject

\item You are coloring the line segment from $(0,0)$ to $(1,0)$ so that the point $(x,0)$ is assigned the color $(0,x,1).$  Describe in a sentence or two how this line segment is colored.


\vskip 3in

\item You have a color represented by $(a,\ 1- b\times\ran,\ c\times\ran)$.  Give values for $a,$ $b,$ and $c$ so that you can make yellow, but you cannot make cyan. You only need to give one set of values $(a,b,c).$ Make sure $0\le a,b,c \le 1.$

\vskip 1in

\bigskip
\item Each of the figures below is drawn inside a unit square with vertices $(0,0),$ $(0,1),$ $(1,1),$ and $(1,0).$  Label the vertices of the figures on the graphs.

\begin{center}
\begin{tikzpicture}[scale=0.5]
\draw[gray] (0,0) grid (10,10);
\draw[thick] (1,7) -- (5,2) --(9,9) -- (10,3) -- cycle;
\begin{scope}[xshift=13cm]
\draw[gray] (0,0) grid (10,10);
\draw[thick,join=round] (1,1) -- (7,6) -- (0,8) -- (9,1) -- cycle;
\end{scope}
\end{tikzpicture}
\end{center}

\end{enumerate}


\end{document}

