Skip to content

Commit

Permalink
by default modebar colors contrasts with paper_bgcolor
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerg committed Oct 5, 2018
1 parent f5cc0e9 commit 452f9bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/plots/layout_attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,18 @@ module.exports = {
bgcolor: {
valType: 'color',
role: 'style',
dflt: 'rgba(255, 255, 255, 0.7)',
editType: 'modebar',
description: 'Sets the background color of the modebar.'
},
color: {
valType: 'color',
role: 'style',
dflt: 'rgba(0, 31, 95, 0.3)',
editType: 'modebar',
description: 'Sets the color of the icons in the modebar.'
},
activecolor: {
valType: 'color',
role: 'style',
dflt: 'rgba(0, 22, 72, 0.5)',
editType: 'modebar',
description: 'Sets the color of the active or hovered on icons in the modebar.'
},
Expand Down
6 changes: 3 additions & 3 deletions src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -1335,9 +1335,9 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) {
coerce('datarevision');

coerce('modebar.orientation');
coerce('modebar.bgcolor');
coerce('modebar.color');
coerce('modebar.activecolor');
coerce('modebar.bgcolor', Color.addOpacity(layoutOut.paper_bgcolor, 0.5));
coerce('modebar.color', Color.contrast(layoutOut.modebar.bgcolor, 30, 30));
coerce('modebar.activecolor', Color.contrast(layoutOut.modebar.bgcolor));

Registry.getComponentMethod(
'calendars',
Expand Down

0 comments on commit 452f9bc

Please sign in to comment.