diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-11-09 16:42:35 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-11-09 16:42:35 -0800 |
commit | e83441395e726a01abc8df95ac996d5b4bc2f364 (patch) | |
tree | 0c86dbb37b03a245d81ce77f36cd4545027cf3de /output.h | |
parent | 43d23ee56e76f07451f725d915f243808ab3784a (diff) |
Make set_color take multiple colors, and choose the best supported one
As suggested in #1323
Diffstat (limited to 'output.h')
-rw-r--r-- | output.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -132,6 +132,9 @@ typedef unsigned int color_support_t; color_support_t output_get_color_support(); void output_set_color_support(color_support_t support); +/** Given a list of rgb_color_t, pick the "best" one, as determined by the color support. Returns rgb_color_t::none() if empty */ +rgb_color_t best_color(const std::vector<rgb_color_t> &colors, color_support_t support); + /* Exported for builtin_set_color's usage only */ void write_color(rgb_color_t color, bool is_fg); unsigned char index_for_color(rgb_color_t c); |