|
|
1.1 root 1: //
2: // nono
1.1.1.3 ! root 3: // Copyright (C) 2020 nono project
1.1 root 4: // Licensed under nono-license.txt
5: //
6:
7: //
8: // 色構造体
9: //
10:
11: #pragma once
12:
13: #include "header.h"
14:
15: //
1.1.1.2 root 16: // 自前の色構造体。
17: // メモリ上 { R, G, B, X } になる順。
18: // uint32 で読むと LE では 0xXXBBGGRR、BE では 0xRRGGBBXX と読める。
1.1 root 19: //
1.1.1.2 root 20: union Color
1.1 root 21: {
1.1.1.2 root 22: uint32 u32 {};
1.1 root 23: struct {
24: uint8 r;
25: uint8 g;
26: uint8 b;
27: uint8 x;
28: };
29:
1.1.1.2 root 30: Color() { }
31: Color(uint32 u32_) {
32: u32 = u32_;
33: }
34: Color(int r_, int g_, int b_) {
1.1 root 35: r = r_;
36: g = g_;
37: b = b_;
38: x = 0;
39: }
40: };
1.1.1.3 ! root 41:
! 42: // カラーユニバーサルデザイン推奨配色セット (ver.4)
! 43: // https://jfly.uni-koeln.de/colorset/
! 44: //
! 45: // 基本はこの配色のみを用いること。
! 46: // ただし色を区別する(色の違いを認識できる)必要のない箇所ならここにない
! 47: // 色も使用可とする。
! 48:
! 49: // アクセントカラー (文字など)
! 50: #define UD_RED Color(255, 75, 0) // FF4B00: 赤
! 51: #define UD_YELLOW Color(255, 241, 0) // FFF100: 黄色
! 52: #define UD_GREEN Color( 3, 175, 122) // 03AF7A: 緑
! 53: #define UD_BLUE Color( 0, 90, 255) // 005AFF: 青
! 54: #define UD_SKYBLUE Color( 77, 196, 255) // 4DC4FF: 空色
! 55: #define UD_PINK Color(255, 128, 130) // FF8082: ピンク
! 56: #define UD_ORANGE Color(246, 170, 0) // F6AA00: オレンジ
! 57: #define UD_PURPLE Color(153, 0, 153) // 990099: 紫
! 58: #define UD_BROWN Color(128, 64, 0) // 804000: 茶色
! 59:
! 60: // ベースカラー (背景など)
! 61: #define UD_LIGHT_PINK Color(255, 202, 191) // FFCABF: 明るいピンク
! 62: #define UD_CREAM Color(255, 255, 128) // FFFF80: クリーム
! 63: #define UD_YELLOW_GREEN Color(216, 242, 85) // D8F255: 明るい黄緑
! 64: #define UD_LIGHT_SKYBLUE Color(191, 228, 255) // BFE4FF: 明るい空色
! 65: #define UD_BEIGE Color(255, 202, 128) // FFCA80: ベージュ
! 66: #define UD_LIGHT_GREEN Color(119, 217, 168) // 77D9A8: 明るい緑
! 67: #define UD_LIGHT_PURPLE Color(201, 172, 230) // C9ACE6: 明るい紫
! 68:
! 69: // 無彩色
! 70: #define UD_WHITE Color(255, 255, 255) // FFFFFF: 白
! 71: #define UD_LIGHT_GREY Color(200, 200, 203) // C8C8CB: 明るいグレー
! 72: #define UD_GREY Color(132, 145, 158) // 84919E: グレー
! 73: #define UD_BLACK Color( 0, 0, 0) // 000000: 黒
! 74:
! 75: // 以下独自色
! 76:
! 77: // パネルの背景色。
! 78: // パネルの背景色は本来 wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) で
! 79: // 取得できる色だと思うが、これが環境依存となると前景色との兼ね合いも再現
! 80: // できなくなるということなのでこれには依存せず、背景色は自分で確定させる。
! 81: // UD_LIGHT_GREY は背景用ではないので背景色にするには暗い。
! 82: // wxGTK(2) の wxLIGHT_GREY は (211, 211, 211) で、これも結構暗め。
! 83: // wxGTK3 はほぼ白(250) で、これは明るすぎて好みではない。
! 84: #define BGPANEL Color(224, 224, 227) // E0E0E3
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.