| 1 |
/* gtkmm example Copyright (C) 2025 gtkmm development team |
| 2 |
* |
| 3 |
* This program is free software; you can redistribute it and/or modify |
| 4 |
* it under the terms of the GNU General Public License as published by |
| 5 |
* the Free Software Foundation; either version 2 of the License, or |
| 6 |
* (at your option) any later version. |
| 7 |
* |
| 8 |
* This program is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
* GNU General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU General Public License along |
| 14 |
* with this program; if not, see <https://www.gnu.org/licenses/>. |
| 15 |
*/ |
| 16 |
|
| 17 |
#ifndef GTKMM_EXAMPLE_COLORS_H |
| 18 |
#define GTKMM_EXAMPLE_COLORS_H |
| 19 |
|
| 20 |
// --- Color Structures --- |
| 21 |
struct Color { |
| 22 |
float r, g, b, a; |
| 23 |
|
| 24 |
Color(float _r, float _g, float _b, float _a = 1.0f) : r(_r), g(_g), b(_b), a(_a) {} |
| 25 |
}; |
| 26 |
|
| 27 |
// Define colors for each face of the cube. |
| 28 |
const Color COLOR_FRONT = {0.0f, 1.0f, 0.0f, 1.0f}; // Bright green |
| 29 |
const Color COLOR_BACK = {1.0f, 1.0f, 0.0f, 1.0f}; // Yellow |
| 30 |
const Color COLOR_TOP = {0.6f, 0.8f, 1.0f, 1.0f}; // Light blue |
| 31 |
const Color COLOR_BOTTOM = {0.5f, 0.0f, 0.5f, 1.0f}; // Purple |
| 32 |
const Color COLOR_RIGHT = {1.0f, 0.0f, 0.0f, 1.0f}; // Red |
| 33 |
const Color COLOR_LEFT = {0.2f, 0.2f, 0.7f, 1.0f}; // Dark blue |
| 34 |
|
| 35 |
#endif // GTKMM_EXAMPLE_COLORS_H |