Skip to content

Commit

Permalink
modified colors (#45)
Browse files Browse the repository at this point in the history
Change colorscales and colorway in plotly theme
  • Loading branch information
asnyv authored Oct 18, 2021
1 parent 0dea13a commit 83203a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 41 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
entry_points={
"webviz_config_themes": ["equinor_theme = webviz_config_equinor:equinor_theme"]
},
install_requires=["webviz-config>=0.0.48"],
install_requires=["plotly", "webviz-config>=0.0.48"],
tests_require=tests_require,
extras_require={"tests": tests_require},
setup_requires=["setuptools_scm~=3.2"],
Expand Down
48 changes: 8 additions & 40 deletions webviz_config_equinor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
from pkg_resources import get_distribution, DistributionNotFound

from webviz_config import WebvizConfigTheme

from plotly import colors

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass


equinor_theme = WebvizConfigTheme(theme_name="equinor")

equinor_theme.external_stylesheets = [
Expand All @@ -35,46 +36,13 @@
"font": {"family": "Equinor"},
"hoverlabel": {"font": {"family": "Equinor"}},
"plot_bgcolor": "white",
"xaxis": {"exponentformat": "SI"},
"yaxis": {"exponentformat": "SI"},
"coloraxis": {"colorbar": {"exponentformat": "SI"}},
"colorscale": {
"diverging": [
[0, "rgb(255, 18, 67)"],
[0.1, "rgb(36, 55, 70)"],
[0.2, "rgb(0, 112, 121)"],
[0.3, "rgb(213, 234, 244)"],
[0.4, "rgb(230, 250, 236)"],
[0.5, "rgb(255, 231, 214)"],
[0.6, "rgb(128, 183, 188)"],
[0.7, "rgb(255, 18, 67)"],
[0.8, "rgb(145, 155, 162)"],
[0.9, "rgb(190, 128, 145)"],
[1, "rgb(178, 212, 215)"],
],
"sequential": [
[0.0, "rgb(36, 55, 70)"],
[0.125, "rgb(102, 115, 125)"],
[0.25, "rgb(145, 155, 162)"],
[0.375, "rgb(189, 195, 199)"],
[0.5, "rgb(255, 231, 214)"],
[0.625, "rgb(216, 178, 189)"],
[0.75, "rgb(190, 128, 145)"],
[0.875, "rgb(164, 76, 101)"],
[1.0, "rgb(125, 0, 35)"],
],
"diverging": colors.get_colorscale("spectral"),
"sequential": colors.get_colorscale("viridis"),
},
"colorway": [
"#FF1243",
"#243746",
"#007079",
"#80B7BC",
"#919BA2",
"#BE8091",
"#B2D4D7",
"#FF597B",
"#BDC3C7",
"#D8B2BD",
"#FFE7D6",
"#D5EAF4",
"#FF88A1",
],
"colorway": colors.qualitative.D3 + colors.qualitative.Light24,
}
}

0 comments on commit 83203a1

Please sign in to comment.