$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
hex_to_color.cc
1 // Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
2 //
3 // This file is part of Olena.
4 //
5 // Olena is free software: you can redistribute it and/or modify it under
6 // the terms of the GNU General Public License as published by the Free
7 // Software Foundation, version 2 of the License.
8 //
9 // Olena is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with Olena. If not, see <http://www.gnu.org/licenses/>.
16 
17 // \file
18 
19 #include <scribo/util/hex_to_color.hh>
20 
21 int main()
22 {
23  using namespace mln;
24 
25  value::rgb8 v1 = scribo::util::hex_to_color("#ADFF2F");
26  value::rgb8 v2 = scribo::util::hex_to_color("ADFF2F");
27  value::rgb8 v3 = scribo::util::hex_to_color("aDfF2F");
28 
29  mln_assertion(v1 == v2);
30  mln_assertion(v2 == v3);
31  mln_assertion(v1 == value::rgb8(173, 255, 47));
32 }