![]() |
aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
|
Colors of the graphs drawn with graphviz: reading of a color, brightness, readable text color. More...
Go to the source code of this file.
Classes | |
| struct | gum::dot::Rgb |
| a color given by its three components, each one between 0 and 255 More... | |
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. | |
Variables | |
| constexpr std::string_view | gum::dot::ADAPTIVE_COLOR = "adaptive" |
| the special value of a font color: black or white, according to the brightness of the background | |
Colors of the graphs drawn with graphviz: reading of a color, brightness, readable text color.
Definition in file dotColor.h.