|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 | """ |
3 | | -RGB Colourspace Models Chromatically Adapted Primaries Application |
4 | | -================================================================== |
| 3 | +RGB Colourspace Chromatically Adapted Primaries Application |
| 4 | +=========================================================== |
5 | 5 | """ |
6 | 6 |
|
7 | 7 | from __future__ import division, unicode_literals |
8 | 8 |
|
9 | | -import numpy as np |
10 | | -import urlparse |
| 9 | +import sys |
| 10 | +import urllib.parse |
11 | 11 | from dash.dependencies import Input, Output |
12 | | -from dash_core_components import Dropdown, Link, Markdown, Slider, Textarea |
| 12 | +from dash_core_components import Dropdown, Link, Markdown, Slider |
13 | 13 | from dash_html_components import A, Code, Div, H3, H5, Li, Pre, Ul |
14 | 14 |
|
15 | 15 | import colour |
|
19 | 19 | ILLUMINANTS_OPTIONS, RGB_COLOURSPACES_OPTIONS) |
20 | 20 |
|
21 | 21 | __author__ = 'Colour Developers' |
22 | | -__copyright__ = 'Copyright (C) 2018 - Colour Developers' |
23 | | -__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause' |
| 22 | +__copyright__ = 'Copyright (C) 2018-2019 - Colour Developers' |
| 23 | +__license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause' |
24 | 24 | __maintainer__ = 'Colour Developers' |
25 | 25 | |
26 | 26 | __status__ = 'Production' |
|
30 | 30 | 'set_primaries_output' |
31 | 31 | ] |
32 | 32 |
|
33 | | -APP_NAME = 'RGB Colourspace Models Chromatically Adapted Primaries' |
| 33 | +APP_NAME = 'RGB Colourspace Chromatically Adapted Primaries' |
34 | 34 | """ |
35 | 35 | App name. |
36 | 36 |
|
|
46 | 46 |
|
47 | 47 | APP_DESCRIPTION = ('This app computes the ' |
48 | 48 | '*Chromatically Adapted Primaries* of the given ' |
49 | | - '*RGB Colourspace Model* to the given *Illuminant*' |
50 | | - ' using the given *Chromatic Adaptation Transform*.') |
| 49 | + '*RGB Colourspace* to the given *Illuminant* using the ' |
| 50 | + 'given *Chromatic Adaptation Transform*.') |
51 | 51 | """ |
52 | 52 | App description. |
53 | 53 |
|
|
116 | 116 | className='list-inline-item'), |
117 | 117 | Li([ |
118 | 118 | A('Permalink', |
119 | | - href=urlparse.urljoin(SERVER_URL, APP_PATH), |
| 119 | + href=urllib.parse.urljoin(SERVER_URL, APP_PATH), |
120 | 120 | target='_blank') |
121 | 121 | ], |
122 | 122 | className='list-inline-item'), |
@@ -153,7 +153,7 @@ def set_primaries_output(colourspace, illuminant, |
153 | 153 | chromatic_adaptation_transform, formatter, decimals): |
154 | 154 | """ |
155 | 155 | Computes and writes the chromatically adapted *primaries *of the given |
156 | | - *RGB* colourspace model to the given *illuminant* using the given |
| 156 | + *RGB* colourspace to the given *illuminant* using the given |
157 | 157 | *chromatic adaptation transform*to into the output :class:`Pre` class |
158 | 158 | instance. |
159 | 159 |
|
@@ -185,7 +185,7 @@ def set_primaries_output(colourspace, illuminant, |
185 | 185 |
|
186 | 186 | with colour.utilities.numpy_print_options( |
187 | 187 | formatter={'float': ('{{: 0.{0}f}}'.format(decimals)).format}, |
188 | | - threshold=np.nan): |
| 188 | + threshold=sys.maxsize): |
189 | 189 | if formatter == 'str': |
190 | 190 | P = str(P) |
191 | 191 | elif formatter == 'repr': |
|
0 commit comments