Better color to bw conversion
authoralpar
Mon, 28 Feb 2005 13:03:36 +0000
changeset 1180f772c360b466
parent 1179 cfe0ed224c2e
child 1181 848b6006941d
Better color to bw conversion
src/lemon/graph_to_eps.h
     1.1 --- a/src/lemon/graph_to_eps.h	Mon Feb 28 12:22:38 2005 +0000
     1.2 +++ b/src/lemon/graph_to_eps.h	Mon Feb 28 13:03:36 2005 +0000
     1.3 @@ -157,8 +157,8 @@
     1.4  ///Returns black for light colors and white for the dark ones.
     1.5  ///\todo weighted average would be better
     1.6  inline Color distantBW(const Color &c){
     1.7 -  double v=(c.getR()+c.getR()+c.getR())<1.5?1:0;
     1.8 -  
     1.9 +  //  double v=(c.getR()+c.getG()+c.getB())<1.5?1:0;
    1.10 +  double v=(.2125*c.getR()+.7154*c.getG()+.0721*c.getB())<.5?1:0;
    1.11    return Color(v,v,v);
    1.12  }
    1.13