Skip to content

Commit

Permalink
Merge branch 'release/v0.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Feb 3, 2023
2 parents 5f3ff1b + 67a3a09 commit 648d7c7
Show file tree
Hide file tree
Showing 5 changed files with 210 additions and 190 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

__major_version__ = "0"
__minor_version__ = "2"
__change_version__ = "2"
__change_version__ = "3"
__version__ = ".".join(
(__major_version__, __minor_version__, __change_version__)
)
Expand Down
190 changes: 100 additions & 90 deletions apps/rgb_colourspace_chromatically_adapted_primaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,112 +90,122 @@ def _uid(id_):

LAYOUT: Div = Div(
[
Location(id=_uid("url"), refresh=False),
H3([Link(APP_NAME, href=APP_PATH)], className="text-center"),
Div(className="col-2"),
Div(
[
Markdown(APP_DESCRIPTION),
H5(children="Colourspace"),
Dropdown(
id=_uid("colourspace"),
options=OPTIONS_RGB_COLOURSPACE,
value=STATE_DEFAULT["colourspace"],
clearable=False,
className="app-widget",
),
H5(children="Illuminant"),
Dropdown(
id=_uid("illuminant"),
options=OPTIONS_ILLUMINANTS,
value=STATE_DEFAULT["illuminant"],
clearable=False,
className="app-widget",
),
H5(children="Chromatic Adaptation Transform"),
Dropdown(
id=_uid("chromatic-adaptation-transform"),
options=OPTIONS_CHROMATIC_ADAPTATION_TRANSFORM,
value=STATE_DEFAULT["chromatic_adaptation_transform"],
clearable=False,
className="app-widget",
),
H5(children="Formatter"),
Dropdown(
id=_uid("formatter"),
options=[
{"label": "str", "value": "str"},
{"label": "repr", "value": "repr"},
],
value=STATE_DEFAULT["formatter"],
clearable=False,
className="app-widget",
),
H5(children="Decimals"),
Slider(
id=_uid("decimals"),
min=1,
max=15,
step=1,
value=STATE_DEFAULT["decimals"],
marks={i + 1: str(i + 1) for i in range(15)},
className="app-widget",
),
Button(
"Copy to Clipboard",
id=_uid("copy-to-clipboard-button"),
n_clicks=0,
style={"width": "100%"},
),
Pre(
[
Code(
id=_uid("primaries-output"), className="code shell"
)
],
className="app-widget app-output",
),
Ul(
Location(id=_uid("url"), refresh=False),
H3([Link(APP_NAME, href=APP_PATH)], className="text-center"),
Div(
[
Li(
[
Link(
"Back to index...",
href="/",
className="app-link",
)
Markdown(APP_DESCRIPTION),
H5(children="Colourspace"),
Dropdown(
id=_uid("colourspace"),
options=OPTIONS_RGB_COLOURSPACE,
value=STATE_DEFAULT["colourspace"],
clearable=False,
className="app-widget",
),
H5(children="Illuminant"),
Dropdown(
id=_uid("illuminant"),
options=OPTIONS_ILLUMINANTS,
value=STATE_DEFAULT["illuminant"],
clearable=False,
className="app-widget",
),
H5(children="Chromatic Adaptation Transform"),
Dropdown(
id=_uid("chromatic-adaptation-transform"),
options=OPTIONS_CHROMATIC_ADAPTATION_TRANSFORM,
value=STATE_DEFAULT[
"chromatic_adaptation_transform"
],
clearable=False,
className="app-widget",
),
H5(children="Formatter"),
Dropdown(
id=_uid("formatter"),
options=[
{"label": "str", "value": "str"},
{"label": "repr", "value": "repr"},
],
className="list-inline-item",
value=STATE_DEFAULT["formatter"],
clearable=False,
className="app-widget",
),
H5(children="Decimals"),
Slider(
id=_uid("decimals"),
min=1,
max=15,
step=1,
value=STATE_DEFAULT["decimals"],
marks={i + 1: str(i + 1) for i in range(15)},
className="app-widget",
),
Button(
"Copy to Clipboard",
id=_uid("copy-to-clipboard-button"),
n_clicks=0,
style={"width": "100%"},
),
Li(
Pre(
[
A(
"Permalink",
href=urllib.parse.urljoin(
str(SERVER_URL), APP_PATH
),
target="_blank",
Code(
id=_uid("primaries-output"),
className="code shell",
)
],
className="list-inline-item",
className="app-widget app-output",
),
Li(
Ul(
[
A(
"colour-science.org",
href="https://www.colour-science.org",
target="_blank",
)
Li(
[
Link(
"Back to index...",
href="/",
className="app-link",
)
],
className="list-inline-item",
),
Li(
[
A(
"Permalink",
href=urllib.parse.urljoin(
str(SERVER_URL), APP_PATH
),
target="_blank",
)
],
className="list-inline-item",
),
Li(
[
A(
"colour-science.org",
href="https://www.colour-science.org",
target="_blank",
)
],
className="list-inline-item",
),
],
className="list-inline-item",
className="list-inline text-center",
),
Div(id=_uid("dev-null"), style={"display": "none"}),
],
className="list-inline text-center",
),
Div(id=_uid("dev-null"), style={"display": "none"}),
],
className="col-6 mx-auto",
className="col-6",
),
]
Div(className="col-2"),
],
Div(className="row"),
)
"""
App layout, i.e. :class:`Div` class instance.
Expand Down
Loading

0 comments on commit 648d7c7

Please sign in to comment.