Sleipnir
|
00001 /***************************************************************************** 00002 * This file is provided under the Creative Commons Attribution 3.0 license. 00003 * 00004 * You are free to share, copy, distribute, transmit, or adapt this work 00005 * PROVIDED THAT you attribute the work to the authors listed below. 00006 * For more information, please see the following web page: 00007 * http://creativecommons.org/licenses/by/3.0/ 00008 * 00009 * This file is a component of the Sleipnir library for functional genomics, 00010 * authored by: 00011 * Curtis Huttenhower (chuttenh@princeton.edu) 00012 * Mark Schroeder 00013 * Maria D. Chikina 00014 * Olga G. Troyanskaya (ogt@princeton.edu, primary contact) 00015 * 00016 * If you use this library, the included executable tools, or any related 00017 * code in your work, please cite the following publication: 00018 * Curtis Huttenhower, Mark Schroeder, Maria D. Chikina, and 00019 * Olga G. Troyanskaya. 00020 * "The Sleipnir library for computational functional genomics" 00021 *****************************************************************************/ 00022 #ifndef COLOR_H 00023 #define COLOR_H 00024 00025 #include "colori.h" 00026 00027 namespace Sleipnir { 00028 00033 class CColor : CColorImpl { 00034 public: 00039 static const CColor c_Black; 00044 static const CColor c_Cyan; 00049 static const CColor c_Green; 00054 static const CColor c_Red; 00059 static const CColor c_White; 00064 static const CColor c_Yellow; 00065 00066 static const CColor c_Blue; 00067 00068 static const CColor c_DarkGreen; 00069 00070 static const CColor c_Orange; 00071 00072 static CColor Interpolate( float dValue, const CColor& ColorMinimum, const CColor& ColorMedium, 00073 const CColor& ColorMaximum ); 00074 00075 CColor( const unsigned char* abRGB ); 00076 CColor( unsigned char bRed, unsigned char bGreen, unsigned char bBlue ); 00077 00078 CColor operator+( const CColor& Color ) const; 00079 CColor operator*( float dValue ) const; 00080 CColor& operator=( const CColor& Color ); 00081 std::string ToRGB( ) const; 00082 bool IsDark( ) const; 00083 }; 00084 00085 } 00086 00087 #endif // COLOR_H