![]() |
aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
|
Implementation of the colors of the graphs drawn with graphviz. More...
#include <algorithm>#include <array>#include <cstdint>#include <agrum/base/core/dot/dotColor.h>#include <agrum/base/core/utils_string.h>Go to the source code of this file.
Namespaces | |
| namespace | gum |
| gum is the global namespace for all aGrUM entities | |
| namespace | gum::dot |
Functions | |
| bool | gum::dot::parseColor (std::string_view color, Rgb &rgb) |
| Reads a color as it is written in a dot attribute. | |
| double | gum::dot::brightness (const Rgb &rgb) |
| Perceived brightness of a color, between 0 (black) and 255 (white): 0.299 R + 0.587 G +
0.114 B. | |
| std::string | gum::dot::contrastColor (const Rgb &rgb) |
| The text color which is readable on a background: white if its brightness is at most 153, black otherwise. | |
| std::string | gum::dot::resolveFgColor (std::string_view fgColor, std::string_view bgColor, std::string_view fallback) |
| The font color to use on a background, once the special value adaptive is resolved. | |
Implementation of the colors of the graphs drawn with graphviz.
Definition in file dotColor.cpp.