pydfnWorks
python wrapper for dfnWorks
helper.py
Go to the documentation of this file.
1 """
2  :filename: helper.py
3  :synopsis: Helper function for output report generation.
4  :version: 1.0
5  :maintainer: Jeffrey Hyman
6 .. moduleauthor:: Jeffrey Hyman <jhyman@lanl.gov>
7 """
8 
9 
11  """ Loads a preselected list of colors for the output report.
12 
13  Parameters
14  -----------
15  None
16 
17  Returns
18  ---------
19  colors : list
20  list of 20 colors
21 
22  Notes
23  ------
24  None
25 
26  """
27  colors = [(31, 119, 180), (174, 199, 232), (255, 127, 14), (255, 187, 120),
28  (44, 160, 44), (152, 223, 138), (214, 39, 40), (255, 152, 150),
29  (148, 103, 189), (197, 176, 213), (140, 86, 75), (196, 156, 148),
30  (227, 119, 194), (247, 182, 210), (127, 127, 127),
31  (199, 199, 199), (188, 189, 34), (219, 219, 141), (23, 190, 207),
32  (158, 218, 229)]
33 
34  # Rescale to values between 0 and 1
35  for i in range(len(colors)):
36  r, g, b = colors[i]
37  colors[i] = (r / 255., g / 255., b / 255.)
38 
39  return colors