Skip to content

Commit fe3eeab

Browse files
committed
dark mode clear color matching notebook export output color
1 parent e314e9b commit fe3eeab

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/_static/showcase.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:e2c1ed6016aefde9f1047f0bf3cbea75275e4dc6a8bcf76ad53a9b8b3bf9fe2d
3-
size 346545
2+
oid sha256:4a48eba4613899ee89a89f0ad417c695bd737142dccc66ab6c33f933b86851d0
3+
size 346551

docs/create_showcase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
<style>
5959
#showcase_root {{ --webgpu-canvas-bg: #ffffff; }}
6060
@media (prefers-color-scheme: dark) {{
61-
#showcase_root {{ --webgpu-canvas-bg: #adadad; }}
61+
#showcase_root {{ --webgpu-canvas-bg: #ced6dd; }}
6262
}}
63-
html[data-theme="dark"] #showcase_root {{ --webgpu-canvas-bg: #adadad; }}
63+
html[data-theme="dark"] #showcase_root {{ --webgpu-canvas-bg: #ced6dd; }}
6464
</style>
6565
<div id="showcase_root" style="width:min(800px,100%); max-width:100%; margin:0 auto 1em auto; position:relative;">
6666
<canvas id="{canvas_id}" width="800" height="400" style="background-color:var(--webgpu-canvas-bg,#ffffff); width:100%; max-width:100%; height:auto; aspect-ratio:800 / 400; touch-action:none; border-radius:8px; display:block;"></canvas>

webgpu/engine/engine.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
const SAMPLE_COUNT = 4;
77
const LIGHT_CLEAR_COLOR = Object.freeze({ r: 1.0, g: 1.0, b: 1.0, a: 1.0 });
8-
const DARK_CLEAR_COLOR = Object.freeze({ r: 0.68, g: 0.68, b: 0.68, a: 1.0 });
8+
const DARK_CLEAR_COLOR = Object.freeze({ r: 0.8078, g: 0.8392, b: 0.8667, a: 1.0 });
99
const LIGHT_CANVAS_BG = '#ffffff';
10-
const DARK_CANVAS_BG = '#adadad';
10+
const DARK_CANVAS_BG = '#ced6dd';
1111
const DEPTH_FORMAT = 'depth24plus';
1212

1313
const TRANSPARENT_BLEND = {

webgpu/jupyter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def _init_html(scene, width, height, flex=None):
3939
<style>
4040
#{id_}root {{ --webgpu-canvas-bg: #ffffff; }}
4141
@media (prefers-color-scheme: dark) {{
42-
#{id_}root {{ --webgpu-canvas-bg: #adadad; }}
42+
#{id_}root {{ --webgpu-canvas-bg: #ced6dd; }}
4343
}}
44-
html[data-theme="dark"] #{id_}root {{ --webgpu-canvas-bg: #adadad; }}
44+
html[data-theme="dark"] #{id_}root {{ --webgpu-canvas-bg: #ced6dd; }}
4545
</style>
4646
<div id='{id_}root'
4747
style="position: relative; width: min({width}px, 100%); max-width: 100%; overflow: hidden;"
@@ -229,9 +229,9 @@ def _DrawHTMLLazy(scene, width=640, height=600):
229229
<style>
230230
#{id_}root {{ --webgpu-canvas-bg: #ffffff; }}
231231
@media (prefers-color-scheme: dark) {{
232-
#{id_}root {{ --webgpu-canvas-bg: #adadad; }}
232+
#{id_}root {{ --webgpu-canvas-bg: #ced6dd; }}
233233
}}
234-
html[data-theme="dark"] #{id_}root {{ --webgpu-canvas-bg: #adadad; }}
234+
html[data-theme="dark"] #{id_}root {{ --webgpu-canvas-bg: #ced6dd; }}
235235
</style>
236236
<div id='{id_}root'
237237
style="position: relative; width: min({width}px, 100%); max-width: 100%; overflow: hidden;"

0 commit comments

Comments
 (0)