2 * Definitions for colors
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
15 #endif /* __cplusplus */
18 * Data structure holding RGB value for a color, 16 bits per channel.
27 * Convert a color_t to a 24-bit RGB value, reducing each channel to
28 * 8 bits and combining them.
30 inline static unsigned int
31 color_t_to_rgb(const color_t *color) {
32 return (((color->red >> 8) << 16)
33 | ((color->green >> 8) << 8)
34 | (color->blue >> 8));
39 #endif /* __cplusplus */
44 * Editor modelines - http://www.wireshark.org/tools/modelines.html
49 * indent-tabs-mode: nil
52 * vi: set shiftwidth=4 tabstop=8 expandtab:
53 * :indentSize=4:tabSize=8:noTabs=true: