-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpalette.lua2p
84 lines (67 loc) · 2.06 KB
/
palette.lua2p
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
local Palette = {}
-- TODO finalize colors
Palette.colors = {
white = {1, 1, 1},
red = {1, 0, 0},
camera_clip = {0, 0, 0},
red_desaturated = @@hex_to_rgb(0x73160f),
menu_text = @@hex_to_rgb(0xffffff),
menu_select = @@hex_to_rgb(0x73160f),
menu_disabled = @@hex_to_rgb(0x4C4C4C),
about_normal = @@hex_to_rgb(0xffffff),
about_hint = @@hex_to_rgb(0xff1744),
ui_show_key_text = {1, 1, 1},
ui_key = {0.121568627, 0.078431373, 0.207843137},
ui_hold_progress = {0.988235294, 0.988235294, 0.925490196},
ui_feedback = {0.380392, 0.878431, 0.635294},
ui_not_hovered = @@hex_to_rgb(0xccc9da),
ui_hovered = @@hex_to_rgb(0xffffff),
ui_dialogue = @@hex_to_rgb(0xffffff),
hovered_choice = {1, 0, 0},
outline = {1, 1, 1},
inventory_cell = {0.623529411765, 0.63137254902, 0.556862745098},
note_list = {0, 0, 0},
note_on_hovered = {1, 0, 0},
}
!if _DEV then
for k, v in pairs(Palette.colors) do
@@assert(v[4] == nil, k .. " must have no alpha set")
end
!end
Palette.diffuse = {
--intro
ambiance_intro = {0.9, 0.9, 0.9, 0.3},
car = {1, 1, 1},
post = {1, 1, 1},
--outside
ambiance_outside = {0.7, 0.7, 0.7, 0.3},
firefly = {3, 2.5, 0},
car_headlight_pl = {5, 4.5, 2.3},
car_headlight_sl = {3, 3, 1},
door_pl = {1.62, 1.46, 1.06},
door_sl = {4, 4, 1},
ambiance_storage_room = {0.7, 0.7, 0.7, 0.3},
storage_room_bulb_light = {1.44, 1.64, 0.2},
ambiance_utility_room = {0.7, 0.7, 0.7, 0.3},
utility_room_bulb_light = {1.44, 1.64, 0.2},
ambiance_kitchen = {0.7, 0.7, 0.7, 0.3},
kitchen_side = {1.44, 1.64, 0.2},
kitchen_mid_pl = {1, 1.12, 0.1},
ambiance_living_room = {0.7, 0.7, 0.7, 0.3},
living_room_mid_pl = {2.28, 1.56, 0.5},
living_room_side = {1.44, 1.64, 0.2},
}
function Palette.get(color, alpha)
@@assert(type(color) == "string")
@@assert(Palette.colors[color])
@@sassert(alpha, type(alpha) == "number")
local c = Palette.colors[color]
local a = alpha or c[4] or 1
return {c[1], c[2], c[3], a}
end
function Palette.get_diffuse(color)
@@assert(type(color) == "string")
@@assert(Palette.diffuse[color])
return {unpack(Palette.diffuse[color])}
end
return Palette