Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
apple_utils.cpp
Go to the documentation of this file.
1#include "apple_utils.hpp"
2
3#ifdef __APPLE__
4#include <TargetConditionals.h>
5
7
8}
9
11 auto [r, g, b] = parse_terminal_color_response();
12 return 0.2126 * (r/255) + 0.7152 * (g/255) + 0.0722 * (b/255);
13}
14
16 return get_terminal_bg_color_luminance() <= 0.5;
17}
18
19#endif
tuple< int, int, int > parse_terminal_color_response()
Parses terminal color response into RGB components on Windows.
bool is_bg_color_dark()
Determines if terminal background color is dark.
tuple< int, int, int > parse_terminal_color_response(const string &response)
Parses terminal color response into RGB components.
float get_terminal_bg_color_luminance()
Gets the luminance of terminal background color.