1 | // Aseprite |
2 | // Copyright (C) 2020 Igara Studio S.A. |
3 | // Copyright (C) 2001-2015 David Capello |
4 | // |
5 | // This program is distributed under the terms of |
6 | // the End-User License Agreement for Aseprite. |
7 | |
8 | #ifndef APP_COLOR_UTILS_H_INCLUDED |
9 | #define APP_COLOR_UTILS_H_INCLUDED |
10 | #pragma once |
11 | |
12 | #include "app/color.h" |
13 | #include "app/color_target.h" |
14 | #include "gfx/color.h" |
15 | #include "doc/color.h" |
16 | #include "doc/pixel_format.h" |
17 | |
18 | namespace doc { |
19 | class Layer; |
20 | } |
21 | |
22 | namespace app { |
23 | namespace color_utils { |
24 | |
25 | gfx::Color blackandwhite(gfx::Color color); |
26 | gfx::Color blackandwhite_neg(gfx::Color color); |
27 | |
28 | gfx::Color color_for_ui(const app::Color& color); |
29 | doc::color_t color_for_image(const app::Color& color, doc::PixelFormat format); |
30 | doc::color_t color_for_image_without_alpha(const app::Color& color, doc::PixelFormat format); |
31 | doc::color_t color_for_layer(const app::Color& color, doc::Layer* layer); |
32 | doc::color_t color_for_target_mask(const app::Color& color, const ColorTarget& colorTarget); |
33 | doc::color_t color_for_target(const app::Color& color, const ColorTarget& colorTarget); |
34 | |
35 | } // namespace color_utils |
36 | } // namespace app |
37 | |
38 | #endif |
39 | |