35
36:- module(prolog_theme_dark, []). 37
44
45:- multifile
46 prolog:theme/1,
47 prolog:console_color/2,
48 pldoc_style:theme/3. 49
50prolog:theme(dark). 51
52:- if(current_predicate(win_window_color/2)). 53set_window_colors :-
54 win_window_color(background, rgb(0,0,0)),
55 win_window_color(foreground, rgb(255,255,255)),
56 win_window_color(selection_background, rgb(0,255,255)),
57 win_window_color(selection_foreground, rgb(0,0,0)).
58
59:- initialization
60 set_window_colors. 61:- endif. 62
63 66
68prolog:console_color(var, [hfg(cyan)]).
69prolog:console_color(code, [hfg(yellow)]).
71prolog:console_color(comment, [hfg(green)]).
72prolog:console_color(warning, [fg(yellow)]).
73prolog:console_color(error, [bold, fg(red)]).
75prolog:console_color(truth(false), [bold, fg(red)]).
76prolog:console_color(truth(true), [bold]).
77prolog:console_color(truth(undefined), [bold, fg(cyan)]).
78prolog:console_color(wfs(residual_program), [fg(cyan)]).
80prolog:console_color(frame(level), [bold]).
81prolog:console_color(port(call), [bold, fg(green)]).
82prolog:console_color(port(exit), [bold, fg(green)]).
83prolog:console_color(port(fail), [bold, fg(red)]).
84prolog:console_color(port(redo), [bold, fg(yellow)]).
85prolog:console_color(port(unify), [bold, fg(blue)]).
86prolog:console_color(port(exception), [bold, fg(magenta)]).
88prolog:console_color(message(informational), [hfg(green)]).
89prolog:console_color(message(information), [hfg(green)]).
90prolog:console_color(message(debug(_)), [hfg(yellow)]).
91prolog:console_color(message(Level), Attrs) :-
92 nonvar(Level),
93 prolog:console_color(Level, Attrs).
94
95
96 99
105
106pldoc_style:theme(var, true, [color(bright_cyan)]).
107pldoc_style:theme(code, true, [color(bright_yellow)]).
108pldoc_style:theme(pre, true, [color(bright_yellow)]).
109pldoc_style:theme(p, class(warning), [color(yellow)]).
110pldoc_style:theme(span, class('synopsis-hdr'), [color(bright_green)]).
111pldoc_style:theme(span, class(autoload), [color(bright_green)]).
112
113
114 117
118:- multifile
119 pce:on_load/0,
120 prolog_colour:style/2. 121
122prolog_colour:style(Class, Style) :-
123 style(Class, Style).
124
133
134style(goal(built_in,_), [colour(cyan)]).
135style(goal(imported(_),_), [colour(cyan)]).
136style(goal(autoload(_),_), [colour(dark_cyan)]).
137style(goal(global,_), [colour(dark_cyan)]).
138style(goal(undefined,_), [colour(orange)]).
139style(goal(thread_local(_),_), [colour(magenta), underline(true)]).
140style(goal(dynamic(_),_), [colour(magenta)]).
141style(goal(multifile(_),_), [colour(pale_green)]).
142style(goal(expanded,_), [colour(cyan), underline(true)]).
143style(goal(extern(_),_), [colour(cyan), underline(true)]).
144style(goal(extern(_,private),_), [colour(red)]).
145style(goal(extern(_,public),_), [colour(cyan)]).
146style(goal(recursion,_), [underline(true)]).
147style(goal(meta,_), [colour(red4)]).
148style(goal(foreign(_),_), [colour(darkturquoise)]).
149style(goal(local(_),_), []).
150style(goal(constraint(_),_), [colour(darkcyan)]).
151style(goal(not_callable,_), [background(orange)]).
152
153style(function, [colour(cyan)]).
154style(no_function, [colour(orange)]).
155
156style(option_name, [colour('#3434ba')]).
157style(no_option_name, [colour(orange)]).
158
159style(head(exported,_), [colour(cyan), bold(true)]).
160style(head(public(_),_), [colour('#016300'), bold(true)]).
161style(head(extern(_),_), [colour(cyan), bold(true)]).
162style(head(dynamic,_), [colour(magenta), bold(true)]).
163style(head(multifile,_), [colour(pale_green), bold(true)]).
164style(head(unreferenced,_), [colour(red), bold(true)]).
165style(head(hook,_), [colour(cyan), underline(true)]).
166style(head(meta,_), []).
167style(head(constraint(_),_), [colour(darkcyan), bold(true)]).
168style(head(imported(_),_), [colour(darkgoldenrod4), bold(true)]).
169style(head(built_in,_), [background(orange), bold(true)]).
170style(head(iso,_), [background(orange), bold(true)]).
171style(head(def_iso,_), [colour(cyan), bold(true)]).
172style(head(def_swi,_), [colour(cyan), bold(true)]).
173style(head(_,_), [bold(true)]).
174
175style(module(_), [colour(light_slate_blue)]).
176style(comment(_), [colour(green)]).
177
178style(directive, [background(grey20)]).
179style(method(_), [bold(true)]).
180
181style(var, [colour(orangered1)]).
182style(singleton, [bold(true), colour(orangered1)]).
183style(unbound, [colour(red), bold(true)]).
184style(quoted_atom, [colour(pale_green)]).
185style(string, [colour(pale_green)]).
186style(codes, [colour(pale_green)]).
187style(chars, [colour(pale_green)]).
188style(nofile, [colour(red)]).
189style(file(_), [colour(cyan), underline(true)]).
190style(file_no_depend(_), [colour(cyan), underline(true),
191 background(dark_violet)]).
192style(directory(_), [colour(cyan)]).
193style(class(built_in,_), [colour(cyan), underline(true)]).
194style(class(library(_),_), [colour(pale_green), underline(true)]).
195style(class(local(_,_,_),_), [underline(true)]).
196style(class(user(_),_), [underline(true)]).
197style(class(user,_), [underline(true)]).
198style(class(undefined,_), [colour(red), underline(true)]).
199style(prolog_data, [colour(cyan), underline(true)]).
200style(flag_name(_), [colour(cyan)]).
201style(no_flag_name(_), [colour(red)]).
202style(unused_import, [colour(cyan), background(pink)]).
203style(undefined_import, [colour(red)]).
204
205style(constraint(_), [colour(darkcyan)]).
206
207style(keyword(_), [colour(cyan)]).
208style(identifier, [bold(true)]).
209style(delimiter, [bold(true)]).
210style(expanded, [colour(cyan), underline(true)]).
211style(hook(_), [colour(cyan), underline(true)]).
212style(op_type(_), [colour(cyan)]).
213
214style(qq_type, [bold(true)]).
215style(qq(_), [colour(cyan), bold(true)]).
216style(qq_content(_), [colour(red4)]).
217
218style(dict_tag, [bold(true)]).
219style(dict_key, [bold(true)]).
220style(dict_function(_), [colour(pale_green)]).
221style(dict_return_op, [colour(cyan)]).
222
223style(hook, [colour(cyan), underline(true)]).
224style(dcg_right_hand_ctx, [background('#609080')]).
225
226style(error, [background(orange)]).
227style(type_error(_), [background(orange)]).
228style(syntax_error(_,_), [background(orange)]).
229style(instantiation_error, [background(orange)]).
230
231style(table_option(_), [bold(true)]).
232style(table_mode(_), [bold(true)]).
233
234
235 238
239:- op(200, fy, @). 240:- op(800, xfx, :=). 241
242pce:on_load :-
243 pce_set_defaults.
244
245pce_set_defaults :-
246 pce_style(Class, Properties),
247 member(Prop, Properties),
248 Prop =.. [Name,Value],
249 term_string(Value, String),
250 send(@default_table, append, Name, vector(Class, String)),
251 fail ; true.
252
258
260
261pce_style(terminal_image,
262 [ background(black),
263 colour(white),
264 selection_style(style(background := yellow, colour := black))
265 ]).
266
268
275
277
278pce_style(text_image,
279 [ background(black),
280 colour(white)
281 ]).
282pce_style(text_margin,
283 [ background(grey20)
284 ]).
285pce_style(editor,
286 [ selection_style(style(background := yellow, colour := black)),
287 isearch_style(style(background := green, colour := black)),
288 isearch_other_style(style(background := pale_turquoise,
289 colour := black))
290 ]).
291
293
294pce_style(prolog_stack_view,
295 [ background(black)
296 ]).
297pce_style(prolog_stack_frame,
298 [ background(black),
299 colour(white)
300 ]).
301pce_style(prolog_stack_link,
302 [ colour(white)
303 ]).
304pce_style(prolog_bindings_view,
305 [ background_active(black),
306 background_inactive(grey50)
307 ]).
308pce_style(prolog_source_structure,
309 [ background(black),
310 colour(white)
311 ]).
312
318
319:- multifile
320 prolog_source_view:port_style/2. 321
322prolog_source_view:port_style(call, [background(forest_green), colour(black)]).
323prolog_source_view:port_style(fail, [background(indian_red), colour(black)]).
324prolog_source_view:port_style(_, [colour(black)])