-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnpr_colors.pro
68 lines (61 loc) · 1.83 KB
/
npr_colors.pro
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
PRO npr_colors
; =========================================================================
;+
;
; NAME:
; npr_colors
;
; PURPOSE:
; A set of 5 colours inspired by an NPR graphic
; http://www.npr.org/2016/04/18/474256366/why-americas-schools-have-a-money-problem
; Credit: Katie Park, Alyson Hurt, Tyler Fisher and Lisa Charlotte Rost/NPR
;
; CALLING SEQUENCE:
; npr_colors
;
; INPUTS:
; N_colors - [Mandatory] number of colors required (1-7)
;
; OUTPUTS:
;
;
; OPTIONAL INPUT KEYWORD PARAMETERS:
; /PLOTEPS - (Boolean) Set if you want to
; return eps file containing all colors
;
; EXAMPLE:
; npr_colors
;
; COMMON BLOCKS:
; None.
;
; CONTACT:
;
; Comments, feedback, and bug reports regarding this routine may be
; directed to this email address: ; [email protected]
;
; https://github.com/PaulJWright/ColourBlind
;
; Credit: Katie Park, Alyson Hurt, Tyler Fisher and Lisa Charlotte Rost/NPR
;
; MODIFICATION HISTORY:
;
;2017.08.09 ;--- (Paul J. Wright, Glasgow) Written.
;
;-
; =========================================================================
; Original colours
red = [224,240,231,82,0]
green = [70,159,223,192,98]
blue = [6,82,190,173,100]
; Adding a background grey
red = [red,237]
green = [green,237]
blue = [blue,237]
scrclr = [[0,0,0],[255,255,255]]
R = [scrclr[0,0], red, INTARR(255 - N_ELEMENTS(x)) + scrclr[0,1]]
G = [scrclr[1,0], green, INTARR(255 - N_ELEMENTS(x)) + scrclr[1,1]]
B = [scrclr[2,0], blue, INTARR(255 - N_ELEMENTS(x)) + scrclr[2,1]]
TVLCT, R, G, B
print, 'To spread the word, please cite work as Wright (2017). Details can be found at https://github.com/PaulJWright/ColourBlind'
END