From 0bca5d3bb7d8de327bc5e087b0b9d379c616033d Mon Sep 17 00:00:00 2001 From: Chris Amow Date: Tue, 11 Aug 2026 19:10:12 -0500 Subject: [PATCH] color palette improved handling --- static/app.js | 9 ++++++++- static/index.html | 10 ++++++---- tests/e2e/drawings.test.mjs | 8 ++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/static/app.js b/static/app.js index 6c4ba38..0753b9e 100644 --- a/static/app.js +++ b/static/app.js @@ -141,6 +141,13 @@ createApp({ '#d96073', '#b07ad6', '#7d67c9', '#4f6fae', '#9fb0c4', '#746c60', '#2c2924', '#c8992f', ]; + const drawingColorNames = { + '#65b7cf': 'Cyan', '#27825c': 'Green', '#45c39b': 'Mint', '#a8c85d': 'Lime', + '#efb643': 'Amber', '#e0a34a': 'Gold', '#d97a3a': 'Orange', '#bd4545': 'Red', + '#d96073': 'Rose', '#b07ad6': 'Purple', '#7d67c9': 'Violet', '#4f6fae': 'Blue', + '#9fb0c4': 'Slate', '#746c60': 'Taupe', '#2c2924': 'Charcoal', '#c8992f': 'Ochre', + }; + const drawingColorName = color => drawingColorNames[color] || color; const now = ref(Date.now()); let chartApi = null; let socket = null; @@ -777,6 +784,6 @@ createApp({ window.removeEventListener('keydown', handleKeydown); }); - return { status, price, barAge, dataUpdatedAt, timeframe, timeframes, drawingColors, prefs, clusters, events, diagnosticMode, captureBusy, captureDiagnostic, armedTool, drawName, drawColor, drawWidth, drawSide, snap, selectedDrawing, selectedDrawings, manualLines, hasDrawingSelection, allManualSelected, alertPrice, alertNote, levelColor, levelWidth, addPriceAlert, armTool, selectTimeframe, allEnabled, toggleGroup, deleteSelected, deleteLine, focusDrawing, toggleDrawingSelection, toggleSelectAll, deleteSelectedLines, renameLine, updateLineStyle, setArmed, commentText, commentFloat, comments, drawings, filteredDrawings, drawingFilter, drawingKind, deleteDrawing, deleteFilteredDrawings, toggleComment, togglePinned }; + return { status, price, barAge, dataUpdatedAt, timeframe, timeframes, drawingColors, drawingColorName, prefs, clusters, events, diagnosticMode, captureBusy, captureDiagnostic, armedTool, drawName, drawColor, drawWidth, drawSide, snap, selectedDrawing, selectedDrawings, manualLines, hasDrawingSelection, allManualSelected, alertPrice, alertNote, levelColor, levelWidth, addPriceAlert, armTool, selectTimeframe, allEnabled, toggleGroup, deleteSelected, deleteLine, focusDrawing, toggleDrawingSelection, toggleSelectAll, deleteSelectedLines, renameLine, updateLineStyle, setArmed, commentText, commentFloat, comments, drawings, filteredDrawings, drawingFilter, drawingKind, deleteDrawing, deleteFilteredDrawings, toggleComment, togglePinned }; }, }).mount('#app'); diff --git a/static/index.html b/static/index.html index 212e924..875f734 100644 --- a/static/index.html +++ b/static/index.html @@ -164,12 +164,13 @@
-
-