Image Component Library (ICL)
Color.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLCore/src/ICLCore/Color.h **
10 ** Module : ICLCore **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLUtils/BasicTypes.h>
35 #include <ICLMath/FixedVector.h>
36 #include <string>
37 
38 namespace icl{
39  namespace core{
40 
43 
46 
49 
52 
53 
56 
59 
60  // Create a color by given name (see GeneralColor Constructor)
61  const Color &iclCreateColor(std::string name);
62 
64  inline Color darker(const Color &c, double factor=0.8){
65  return c*factor;
66  }
67 
69  inline Color lighter(const Color &c,double factor=0.8){
70  return c/factor;
71  }
72 
74 
89  Color ICLCore_API color_from_string(const std::string &name);
90 
91  } // namespace core
92 }
math::FixedColVector< icl8u, 4 > RGBA
RGBA Color.
Definition: Color.h:48
undocument this line if you encounter any issues!
Definition: Any.h:37
math::FixedColVector< icl8u, 3 > Color
Default color type of the ICL.
Definition: Color.h:42
Color lighter(const Color &c, double factor=0.8)
Creates a (by default 20 percent) lighter color.
Definition: Color.h:69
Color ICLCore_API color_from_string(const std::string &name)
Parses a color string representation into a color structur.
Color darker(const Color &c, double factor=0.8)
Creates a (by default 20 percent) darker color.
Definition: Color.h:64
math::FixedColVector< icl32f, 3 > Color32f
Special color type for float valued colors.
Definition: Color.h:51
math::FixedColVector< icl32f, 4 > Color4D32f
Special color type for e.g. rgba color information (float)
Definition: Color.h:58
math::FixedColVector< icl8u, 3 > RGB
RGB Color.
Definition: Color.h:45
math::FixedColVector< icl8u, 4 > Color4D
Special color type for e.g. rgba color information.
Definition: Color.h:55
#define ICLCore_API
Definition: CompatMacros.h:174
const Color & iclCreateColor(std::string name)