I assume your links were created with the Hyperref package and that you want to view the colored links on screen yet print to paper all text in grayscale.
From the Hyperref documentation over at
Experimental option `ocgcolorlinks'
The idea are colored links, when
viewed, but printed without colors.
This new experimental option
`ocgcolorlinks' uses Optional Content
Groups, a feature introduced in PDF
The option must be given for package loading:
Main disadvantage: Links cannot be broken across lines.
PDF reference 1.7: 4.10.2 "Making Graphical Content Optional":
Graphics state operations, such as setting the color, ...,
are still applied.
Therefore the link text is put in a box and set twice, with and
without color. * The feature can be switched of by
inside the document.
Supported drivers: pdftex, dvipdfm
version should be at least 1.5. It is
set for pdfTeX. Users of dvipdfmx set the version on the command
line: dvipdfmx -V 5
From what it says, you will need to make sure your links do not break across lines. There are several ways of doing this, like using
~ instead of spaces between words, surrounding the link with an
\mbox or coding some sort of penalty in a custom url-type command.
On the other hand, if you do not want to see the colors on the screen or on paper, just set the option
colorlinks=false when calling the hyperref package.