diff --git a/CandlePanel.js b/CandlePanel.js index c4c8ce19c..ad2a09c78 100644 --- a/CandlePanel.js +++ b/CandlePanel.js @@ -201,7 +201,7 @@ function newAAMastersPlottersCandlesVolumesCandlesCandlePanel() { browserCanvasContext.lineTo(stickPoint4.x, stickPoint4.y); browserCanvasContext.closePath(); - browserCanvasContext.fillStyle = 'rgba(54, 54, 54, 1)'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', 1)'; browserCanvasContext.fill(); browserCanvasContext.lineWidth = 1; @@ -218,13 +218,13 @@ function newAAMastersPlottersCandlesVolumesCandlesCandlePanel() { const OPACITY = '1'; - if (currentCandle.innerCandle.direction === 'up') { browserCanvasContext.strokeStyle = 'rgba(27, 105, 7, ' + OPACITY + ')'; } - if (currentCandle.innerCandle.direction === 'down') { browserCanvasContext.strokeStyle = 'rgba(130, 9, 9, ' + OPACITY + ')'; } - if (currentCandle.innerCandle.direction === 'side') { browserCanvasContext.strokeStyle = 'rgba(27, 7, 105, ' + OPACITY + ')'; } + if (currentCandle.innerCandle.direction === 'up') { browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.PATINATED_TURQUOISE + ', ' + OPACITY + ')'; } + if (currentCandle.innerCandle.direction === 'down') { browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.RED + ', ' + OPACITY + ')'; } + if (currentCandle.innerCandle.direction === 'side') { browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.DARK + ', ' + OPACITY + ')'; } - if (currentCandle.innerCandle.direction === 'up') { browserCanvasContext.fillStyle = 'rgba(64, 217, 26, ' + OPACITY + ')'; } - if (currentCandle.innerCandle.direction === 'down') { browserCanvasContext.fillStyle = 'rgba(219, 18, 18, ' + OPACITY + ')'; } - if (currentCandle.innerCandle.direction === 'side') { browserCanvasContext.fillStyle = 'rgba(64, 26, 217, ' + OPACITY + ')'; } + if (currentCandle.innerCandle.direction === 'up') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.GREEN + ', ' + OPACITY + ')'; } + if (currentCandle.innerCandle.direction === 'down') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.RUSTED_RED + ', ' + OPACITY + ')'; } + if (currentCandle.innerCandle.direction === 'side') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', ' + OPACITY + ')'; } browserCanvasContext.fill(); @@ -286,7 +286,7 @@ function newAAMastersPlottersCandlesVolumesCandlesCandlePanel() { labelPoint = thisObject.container.frame.frameThisPoint(labelPoint); - browserCanvasContext.fillStyle = 'rgba(60, 60, 60, ' + opacity + ')'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', ' + opacity + ')'; browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y); } diff --git a/Candles.js b/Candles.js index 0c2a4e70e..2529815fc 100644 --- a/Candles.js +++ b/Candles.js @@ -664,7 +664,7 @@ browserCanvasContext.lineTo(stickPoint4.x, stickPoint4.y); browserCanvasContext.closePath(); - browserCanvasContext.fillStyle = 'rgba(54, 54, 54, 1)'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', 1)'; browserCanvasContext.fill(); if (datetime !== undefined) { @@ -673,14 +673,14 @@ if (dateValue >= candle.begin && dateValue <= candle.end) { - browserCanvasContext.strokeStyle = 'rgba(255, 233, 31, 1)'; // Current candle accroding to time + browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', 1)'; // Current candle accroding to time } else { - browserCanvasContext.strokeStyle = 'rgba(212, 206, 201, 1)'; + browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.LIGHT + ', 1)'; } } else { - browserCanvasContext.strokeStyle = 'rgba(212, 206, 201, 1)'; + browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.LIGHT + ', 1)'; } browserCanvasContext.lineWidth = 1; @@ -695,9 +695,9 @@ browserCanvasContext.closePath(); - if (candle.direction === 'up') { browserCanvasContext.strokeStyle = 'rgba(27, 105, 7, 1)'; } - if (candle.direction === 'down') { browserCanvasContext.strokeStyle = 'rgba(130, 9, 9, 1)'; } - if (candle.direction === 'side') { browserCanvasContext.strokeStyle = 'rgba(27, 7, 105, 1)'; } + if (candle.direction === 'up') { browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.PATINATED_TURQUOISE + ', 1)'; } + if (candle.direction === 'down') { browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.RED + ', 1)'; } + if (candle.direction === 'side') { browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.DARK + ', 1)'; } if (datetime !== undefined) { @@ -707,7 +707,7 @@ /* highlight the current candle */ - browserCanvasContext.fillStyle = 'rgba(255, 233, 31, 1)'; // Current candle accroding to time + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', 1)'; // Current candle accroding to time let currentCandle = { bodyWidth: candlePoint2.x - candlePoint1.x, @@ -723,16 +723,16 @@ } else { - if (candle.direction === 'up') { browserCanvasContext.fillStyle = 'rgba(64, 217, 26, 1)'; } - if (candle.direction === 'down') { browserCanvasContext.fillStyle = 'rgba(219, 18, 18, 1)'; } - if (candle.direction === 'side') { browserCanvasContext.fillStyle = 'rgba(64, 26, 217, 1)'; } + if (candle.direction === 'up') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.GREEN + ', 1)'; } + if (candle.direction === 'down') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.RUSTED_RED + ', 1)'; } + if (candle.direction === 'side') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', 1)'; } } } else { - if (candle.direction === 'up') { browserCanvasContext.fillStyle = 'rgba(64, 217, 26, 1)'; } - if (candle.direction === 'down') { browserCanvasContext.fillStyle = 'rgba(219, 18, 18, 1)'; } - if (candle.direction === 'side') { browserCanvasContext.fillStyle = 'rgba(64, 26, 217, 1)'; } + if (candle.direction === 'up') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.GREEN + ', 1)'; } + if (candle.direction === 'down') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.RUSTED_RED + ', 1)'; } + if (candle.direction === 'side') { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', 1)'; } } diff --git a/VolumePanel.js b/VolumePanel.js index aae9ecb46..ad2c266e1 100644 --- a/VolumePanel.js +++ b/VolumePanel.js @@ -149,8 +149,8 @@ function newAAMastersPlottersCandlesVolumesVolumesVolumePanel() { browserCanvasContext.closePath(); - browserCanvasContext.strokeStyle = 'rgba(27, 105, 7, ' + OPACITY + ')'; - browserCanvasContext.fillStyle = 'rgba(64, 217, 26, ' + OPACITY + ')'; + browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.PATINATED_TURQUOISE + ', ' + OPACITY + ')'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.GREEN + ', ' + OPACITY + ')'; browserCanvasContext.fill(); @@ -167,8 +167,8 @@ function newAAMastersPlottersCandlesVolumesVolumesVolumePanel() { browserCanvasContext.closePath(); - browserCanvasContext.strokeStyle = 'rgba(130, 9, 9, ' + OPACITY + ')'; - browserCanvasContext.fillStyle = 'rgba(219, 18, 18, ' + OPACITY + ')'; + browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.RED + ', ' + OPACITY + ')'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.RUSTED_RED + ', ' + OPACITY + ')'; browserCanvasContext.fill(); @@ -208,7 +208,7 @@ function newAAMastersPlottersCandlesVolumesVolumesVolumePanel() { labelPoint = thisObject.container.frame.frameThisPoint(labelPoint); - browserCanvasContext.fillStyle = 'rgba(60, 60, 60, ' + opacity + ')'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', ' + opacity + ')'; browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y); } diff --git a/Volumes.js b/Volumes.js index 83de73609..dc57d7438 100644 --- a/Volumes.js +++ b/Volumes.js @@ -696,21 +696,21 @@ if (dateValue >= volume.begin && dateValue <= volume.end) { - browserCanvasContext.fillStyle = 'rgba(255, 233, 31, 0.40)'; // Current bar accroding to time + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', 0.40)'; // Current bar accroding to time } else { - browserCanvasContext.fillStyle = 'rgba(64, 217, 26, 0.40)'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.GREEN + ', 0.40)'; } } else { - browserCanvasContext.fillStyle = 'rgba(64, 217, 26, 0.40)'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.GREEN + ', 0.40)'; } browserCanvasContext.fill(); - browserCanvasContext.strokeStyle = 'rgba(27, 105, 7, 0.40)'; + browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.PATINATED_TURQUOISE + ', 0.40)'; browserCanvasContext.lineWidth = 1; browserCanvasContext.stroke(); @@ -730,20 +730,20 @@ if (dateValue >= volume.begin && dateValue <= volume.end) { - browserCanvasContext.fillStyle = 'rgba(255, 233, 31, 0.40)'; // Current volume accroding to time + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', 0.40)'; // Current volume accroding to time } else { - browserCanvasContext.fillStyle = 'rgba(219, 18, 18, 0.40)'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.RUSTED_RED + ', 0.40)'; } } else { - browserCanvasContext.fillStyle = 'rgba(219, 18, 18, 0.40)'; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.RUSTED_RED + ', 0.40)'; } - browserCanvasContext.strokeStyle = 'rgba(130, 9, 9, 0.40)'; + browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.RED + ', 0.40)'; browserCanvasContext.fill(); browserCanvasContext.lineWidth = 1;