Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grey Font Color Printing

Is there any way to ensure that my grey font colors do not turn black?

Firefox and Chrome seem to do this in order to prevent white text on black background from turning into white on white. I do not have a background color (except white), so this browser-level conversion is not useful, it only helps in preventing grey colors for no reason.

Is there a way to turn this off? Or should I just stick with techniques like opacity, browser detection, and coloring my grays...

like image 777
700 Software Avatar asked Sep 30 '11 20:09

700 Software


2 Answers

Solution:

  @media print {       h1 {         color: rgba(0, 0, 0, 0);         text-shadow: 0 0 0 #ccc;       }        @media print and (-webkit-min-device-pixel-ratio:0) {         h1 {           color: #ccc;           -webkit-print-color-adjust: exact;         }       }    } 
like image 157
Nazar Vynnytskyi Avatar answered Sep 23 '22 15:09

Nazar Vynnytskyi


I found had to :

  1. Add !important to the css rule... and...

  2. In the Firefox print dialog, tick the option for "Appearance: Print background colors"

I couldn't get it to work in Chrome.

like image 45
matt burns Avatar answered Sep 22 '22 15:09

matt burns