forked from sbyrnes321/ColorPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
figures.py
executable file
·85 lines (65 loc) · 2.41 KB
/
figures.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
'''
figures.py - Create all the ColorPy sample figures.
Description:
Creates the sample figures.
This can also create the figures with some non-default initialization conditions.
Functions:
figures() -
Create all the sample figures.
figures_clip_clamp_to_zero () -
Adjust the color clipping method, and create the sample figures.
figures_gamma_245 () -
Adjust the gamma correction to a power law gamma = 2.45 and create samples.
figures_white_A () -
Adjust the white point (for Luv/Lab) and create sample figures.
License:
Copyright (C) 2008 Mark Kness
Author - Mark Kness - [email protected]
This file is part of ColorPy.
ColorPy is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
ColorPy is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with ColorPy. If not, see <http://www.gnu.org/licenses/>.
'''
import colormodels
import ciexyz
import illuminants
import plots
import blackbody
import rayleigh
import thinfilm
import misc
def figures ():
'''Create all the ColorPy sample figures.'''
# no figures for colormodels and ciexyz
colormodels.init() # default
illuminants.figures()
plots.figures()
blackbody.figures()
rayleigh.figures()
thinfilm.figures()
misc.figures()
def figures_clip_clamp_to_zero ():
'''Adjust the color clipping method, and create the sample figures.'''
colormodels.init()
colormodels.init_clipping (colormodels.CLIP_CLAMP_TO_ZERO)
figures()
def figures_gamma_245 ():
'''Adjust the gamma correction to a power law gamma = 2.45 and create samples.'''
colormodels.init()
colormodels.init_gamma_correction (
display_from_linear_function = colormodels.simple_gamma_invert,
linear_from_display_function = colormodels.simple_gamma_correct,
gamma = 2.45)
figures()
def figures_white_A ():
'''Adjust the white point (for Luv/Lab) and create sample figures.'''
colormodels.init()
colormodels.init_Luv_Lab_white_point (colormodels.WhiteA)
figures()