Module: Rubyvis::Colors

Defined in:
lib/rubyvis/color/colors.rb

Class Method Summary collapse

Class Method Details

.category10(*arguments) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/rubyvis/color/colors.rb', line 12

def self.category10(*arguments)
  scale = Rubyvis.colors(
  "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
  "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf")
  scale.domain(*arguments) if arguments.size>0
  scale
end

.category19(*arguments) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/rubyvis/color/colors.rb', line 19

def self.category19(*arguments)
  scale = Rubyvis.colors(
  "#9c9ede", "#7375b5", "#4a5584", "#cedb9c", "#b5cf6b",
  "#8ca252", "#637939", "#e7cb94", "#e7ba52", "#bd9e39",
  "#8c6d31", "#e7969c", "#d6616b", "#ad494a", "#843c39",
  "#de9ed6", "#ce6dbd", "#a55194", "#7b4173")
  scale.domain(*arguments) if arguments.size>0
  scale
end

.category20(*arguments) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/rubyvis/color/colors.rb', line 28

def self.category20(*arguments)
  scale = Rubyvis.colors(
  "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c",
  "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5",
  "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f",
  "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5")
  scale.domain(*arguments) if arguments.size>0
  scale
end