]> Stephen's Gitweb - donsol-js.git/commitdiff
Add Sonic Pi theme
authorStephen Jianu <stephen@stephenjianu.com>
Sun, 25 Jan 2026 21:34:07 +0000 (15:34 -0600)
committerStephen Jianu <stephen@stephenjianu.com>
Sun, 25 Jan 2026 21:34:07 +0000 (15:34 -0600)
sources/scripts/donsol.js
sources/scripts/player.js
sources/scripts/settings.js

index 02b0dd30041b9c3390564deebf5fcf5c5cc78e28..c1207ad124a8c2e0417de9f1373e4740a6ad78e5 100644 (file)
@@ -436,6 +436,17 @@ function Donsol () {
     b_low: '#fdf6e3',
     b_inv: '#cb4b16'
   }
+  this.sonicPiTheme = {
+    background: '#ffffff',
+    f_high: '#000000',
+    f_med: '#ed1e92',
+    f_low: '#aaaaaa',
+    f_inv: '#ffffff',
+    b_high: '#444444',
+    b_med: '#555555',
+    b_low: '#ced0ce',
+    b_inv: '#ed1e92'
+  }
   this.tapeTheme = {
     background: '#dad7cd',
     f_high: '#696861',
index 29a9300adbce2d5c23a4b18adb63cb429e26948d..14a72e762d87b48462e723c3f26a20e64717096f 100644 (file)
@@ -266,6 +266,9 @@ function Player () {
     if (theme_value.localeCompare('solarizedLight') === 0) {
       new_theme = donsol.solarizedLightTheme
     }
+    if (theme_value.localeCompare('sonicPi') === 0) {
+      new_theme = donsol.sonicPiTheme
+    }
     if (theme_value.localeCompare('tape') === 0) {
       new_theme = donsol.tapeTheme
     }
index d14a05af134cdaacee8881ac2ecbb357deb2eadf..b4522cb2b6d15be818bde0f7cc8d2d00ebc976a3 100644 (file)
@@ -49,6 +49,7 @@ function Settings () {
     this.theme_button.innerHTML += '<option value=\"snow\">Snow</option>'
     this.theme_button.innerHTML += '<option value=\"solarizedDark\">Solarized Dark</option>'
     this.theme_button.innerHTML += '<option value=\"solarizedLight\">Solarized Light</option>'
+    this.theme_button.innerHTML += '<option value=\"sonicPi\">Sonic Pi</option>'
     this.theme_button.innerHTML += '<option value=\"tape\">Tape</option>'
     this.theme_button.addEventListener('mousedown', () => { donsol.player.change_theme(this.theme_button.value) })
     this.theme_button.addEventListener('change', () => { donsol.player.change_theme(this.theme_button.value) })