% colors_random.m
%
while ( true )

  xlist = [ 0, 1, 1, 0 ];
  ylist = [ 0, 0, 1, 1 ];
  r = rand ( );
  g = rand ( );
  b = rand ( );
  color = [ r, g, b ];
  title_string = sprintf ( ' [ %.3f, %.3f, %.3f ]', r, g, b );
  fill ( xlist, ylist, color );
  title ( title_string );
  axis off

  yesno = input ( 'Another color (Y/N):', 's' );
  if ( yesno == 'N' || yesno == 'n' )
    break
  end

  clf

end

