Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 452f9bc

Browse filesBrowse files
committed
by default modebar colors contrasts with paper_bgcolor
1 parent f5cc0e9 commit 452f9bc
Copy full SHA for 452f9bc

File tree

Expand file treeCollapse file tree

2 files changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-6
lines changed

‎src/plots/layout_attributes.js

Copy file name to clipboardExpand all lines: src/plots/layout_attributes.js
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,21 +237,18 @@ module.exports = {
237237
bgcolor: {
238238
valType: 'color',
239239
role: 'style',
240-
dflt: 'rgba(255, 255, 255, 0.7)',
241240
editType: 'modebar',
242241
description: 'Sets the background color of the modebar.'
243242
},
244243
color: {
245244
valType: 'color',
246245
role: 'style',
247-
dflt: 'rgba(0, 31, 95, 0.3)',
248246
editType: 'modebar',
249247
description: 'Sets the color of the icons in the modebar.'
250248
},
251249
activecolor: {
252250
valType: 'color',
253251
role: 'style',
254-
dflt: 'rgba(0, 22, 72, 0.5)',
255252
editType: 'modebar',
256253
description: 'Sets the color of the active or hovered on icons in the modebar.'
257254
},

‎src/plots/plots.js

Copy file name to clipboardExpand all lines: src/plots/plots.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,9 +1335,9 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) {
13351335
coerce('datarevision');
13361336

13371337
coerce('modebar.orientation');
1338-
coerce('modebar.bgcolor');
1339-
coerce('modebar.color');
1340-
coerce('modebar.activecolor');
1338+
coerce('modebar.bgcolor', Color.addOpacity(layoutOut.paper_bgcolor, 0.5));
1339+
coerce('modebar.color', Color.contrast(layoutOut.modebar.bgcolor, 30, 30));
1340+
coerce('modebar.activecolor', Color.contrast(layoutOut.modebar.bgcolor));
13411341

13421342
Registry.getComponentMethod(
13431343
'calendars',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.