Skip to content

Commit

Permalink
chore: improve color picker format
Browse files Browse the repository at this point in the history
  • Loading branch information
peterklingelhofer committed Mar 12, 2023
1 parent 005929c commit 66fde3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ yarn run watch
Modify settings by going to **Application** (found in the top right via `>>`) > **Local Storage**. Use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>I</kbd> or <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>I</kbd>to open and close these Developer Tools to [access and modify these settings](https://developer.chrome.com/docs/devtools/storage/localstorage/#edit), and <kbd>Ctrl</kbd> + <kbd>R</kbd> or <kbd>Cmd</kbd> + <kbd>R</kbd> to refresh the app to use your newly selected settings. If no settings appear on the first run of the application, you can manually add them), following the format of the `storedValues` variable in [`/src/renderer.ts`](https://github.com/peterklingelhofer/exhale/blob/main/src/renderer.ts). To add them manually, go to the **Console** and copy paste the following code into the console and press <kbd>Enter</kbd> or <kbd>Return</kbd> to populate your `localStorage` (these are the defaults as of the time of writing):
```js
localStorage = {
colorExhale: "rgba(168,50,150,1)",
colorInhale: "rgba(0,221,255,1)",
colorPause: "rgba(0,221,255,1)",
colorExhale: "rgb(168, 50, 150)",
colorInhale: "rgb(0, 221, 255)",
colorPause: "rgb(0, 221, 255)",
durationExhale: "10",
durationInhale: "5",
durationPostExhale: "0",
Expand Down
8 changes: 4 additions & 4 deletions src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const storedValues: {
durationPostInhale: number;
opacity: number;
} = {
colorExhale: localStorage.colorExhale || "rgba(168,50,150,1)",
colorInhale: localStorage.colorInhale || "rgba(0,221,255,1)",
colorPause: localStorage.colorPause || "rgba(0,221,255,1)",
colorExhale: localStorage.colorExhale || "rgb(168, 50, 150)",
colorInhale: localStorage.colorInhale || "rgb(0, 221, 255)",
colorPause: localStorage.colorPause || "rgb(0, 221, 255)",
durationExhale: +localStorage.durationExhale || 10,
durationInhale: +localStorage.durationInhale || 5,
durationPostExhale: +localStorage.durationPostExhale || 0,
Expand All @@ -63,7 +63,7 @@ let state = State.INHALE;
let startFrame = 0;
let endFrame = 0;
let radius = 0;
let color: Color = "black";
let color: Color = colorInhale;

let canvasWidth = window.innerWidth;
let canvasHeight = window.innerHeight;
Expand Down

0 comments on commit 66fde3c

Please sign in to comment.