Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpColorBlindFriendlyPalette.h
1
/*
2
* ViSP, open source Visual Servoing Platform software.
3
* Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4
*
5
* This software is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
* See the file LICENSE.txt at the root directory of this source
10
* distribution for additional information about the GNU GPL.
11
*
12
* For using ViSP with software that can not be combined with the GNU
13
* GPL, please contact Inria about acquiring a ViSP Professional
14
* Edition License.
15
*
16
* See https://visp.inria.fr for more information.
17
*
18
* This software was developed at:
19
* Inria Rennes - Bretagne Atlantique
20
* Campus Universitaire de Beaulieu
21
* 35042 Rennes Cedex
22
* France
23
*
24
* If you have questions regarding the use of this file, please contact
25
* Inria at visp@inria.fr
26
*
27
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
*
30
* Description:
31
* Palette of colors that is said to be color-blind people friendly.
32
* This palette has been found on https://jfly.uni-koeln.de/color/#see
33
*/
34
35
#ifndef _vpColorBlindFliendlyPalette_h_
36
#define _vpColorBlindFliendlyPalette_h_
37
38
#include <iostream>
39
40
#include <visp3/core/vpConfig.h>
41
#include <visp3/core/vpColor.h>
42
43
#if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
48
BEGIN_VISP_NAMESPACE
49
class
VISP_EXPORT
vpColorBlindFriendlyPalette
50
{
51
public
:
55
typedef
enum class
Palette
56
{
57
Black = 0,
58
Orange = 1,
59
SkyBlue = 2,
60
Green = 3,
61
Yellow = 4,
62
Blue = 5,
63
Vermillon = 6,
64
Purple = 7,
65
COUNT = 8
66
}Palette;
67
68
static
std::vector<std::string> s_paletteNames;
69
75
vpColorBlindFriendlyPalette
();
76
83
vpColorBlindFriendlyPalette
(
const
Palette &colorID);
84
91
vpColorBlindFriendlyPalette
(
const
std::string &nameColor);
92
98
Palette get_colorID()
const
;
99
106
vpColor
to_vpColor()
const
;
107
115
std::vector<unsigned char> to_RGB()
const
;
116
126
std::vector<double> to_colorRatio()
const
;
127
135
bool
set_fromString(
const
std::string &nameColor);
136
142
std::string to_string()
const
;
143
152
static
std::string getAvailableColorsNames(
const
std::string &prefix =
""
,
const
std::string &separator =
" "
,
const
std::string &suffix =
""
);
153
private
:
154
static
std::vector<vpColor> s_palette;
155
163
static
unsigned
int
to_uint(
const
Palette &colorID);
164
172
static
std::string to_string(
const
Palette &colorID);
173
174
Palette m_colorID;
175
};
176
END_VISP_NAMESPACE
177
185
std::ostream &operator<<(std::ostream &os,
const
VISP_NAMESPACE_ADDRESSING
vpColorBlindFriendlyPalette
&color);
186
195
std::istream &operator>>(std::istream &is, VISP_NAMESPACE_ADDRESSING
vpColorBlindFriendlyPalette
&color);
196
197
#endif
198
#endif
// _vpColorBlindFliendlyPalette_h_
vpColorBlindFriendlyPalette
Class that furnishes a set of colors that color blind people should be able to distinguish one from a...
Definition
vpColorBlindFriendlyPalette.h:50
vpColorBlindFriendlyPalette::Palette
Palette
Enum that list the different available colors.
Definition
vpColorBlindFriendlyPalette.h:56
vpColorBlindFriendlyPalette::vpColorBlindFriendlyPalette
vpColorBlindFriendlyPalette()
Construct a new vp Color Blind Friendly Palette. The default value vpColorBlindFriendlyPalette::Palet...
Definition
vpColorBlindFriendlyPalette.cpp:64
vpColor
Class to define RGB colors available for display functionalities.
Definition
vpColor.h:157
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
gui
include
visp3
gui
vpColorBlindFriendlyPalette.h
Generated by
1.17.0