diff --git a/lib/rubyplot/color.rb b/lib/rubyplot/color.rb index 718334e..820ed30 100644 --- a/lib/rubyplot/color.rb +++ b/lib/rubyplot/color.rb @@ -1,29 +1,43 @@ module Rubyplot module Color # A list of contrasting colors that is used in Bartype BasePlots by default - CONTRASTING_COLORS = - [ - '#e6194b', - '#3cb44b', - '#ffe119', - '#0082c8', - '#f58231', - '#911eb4', - '#46f0f0', - '#f032e6', - '#d2f53c', - '#fabebe', - '#008080', - '#e6beff', - '#aa6e28', - '#fffac8', - '#800000', - '#aaffc3', - '#808000', - '#ffd8b1', - '#000080', - '#808080' - ].freeze + CONTRASTING_COLORS = { + gun_powder: '#4a465a', + eastern_blue: '#0083a3', + bittersweet: '#ff6a6a', + light_pink: '#ffaeb9', + violet: '#ee82ee', + bright_turquoise: '#00e5ee', + spring_green: '#00ff7f', + green_yellow: '#c0ff3e', + orange: '#ffa500', + misty_rose: '#ffe4e1', + silver: '#bdbdbd', + falu_red: '#8b2500', + royal_blue: '#436eee', + crimson: '#dc143c', + crimson: '#e6194b', + fruit_salad: '#3cb44b', + lemon: '#ffe119', + bondi_blue: '#0082c8', + sun: '#f58231', + dark_orchid: '#911eb4', + turquoise: '#46f0f0', + razzle_dazzle_rose: '#f032e6', + pear: '#d2f53c', + your_pink: '#fabebe', + teal: '#008080', + mauve: '#e6beff', + hot_toddy: '#aa6e28', + lemon_chiffon: '#fffac8', + maroon: '#800000', + magic_mint: '#aaffc3', + olive: '#808000', + sandy_beach: '#ffd8b1', + navy: '#000080', + grey: '#808080', + pattens_blue: '#d1edf5' + }.freeze # A list of color symbols inspired by xkcd survey # https://xkcd.com/color/rgb/ @@ -972,7 +986,8 @@ module Color blue: '#0000FF', green: '#008000', purple: '#7e1e9c', - vivid_orange: '#ff7f0e', + vivid_orange: '#ff7f0e' + }.freeze end end diff --git a/lib/rubyplot/themes.rb b/lib/rubyplot/themes.rb index 9a3ce9e..2b03df6 100644 --- a/lib/rubyplot/themes.rb +++ b/lib/rubyplot/themes.rb @@ -6,40 +6,42 @@ module Themes BASIC = { marker_color: 'white', # The color of the marker used to make marker lines on plot. font_color: 'white', # Font Color used to write on the plot. - background_colors: %w[black #4a465a], # The Background colors that form the gradient - label_colors: %w[#ffe119 #0082c8 #f58231 #911eb4 #aaffc3 #808000 #ffd8b1 #000080 #808080] + background_colors: %I[black gun_powder], # The Background colors that form the gradient + label_colors: %I[lemon bondi_blue sun dark_orchid magic_mint olive sandy_beach navy grey] }.freeze TRACKS = { marker_color: 'white', font_color: 'white', - background_colors: %w[#0083a3 #0083a3], - label_colors: %w[yellow green blue red maroon grey \ -#FF6A6A #FFAEB9 #EE82EE #00E5EE #00FF7F #C0FF3E #FFA500 #FFE4E1\ -#BDBDBD #8B2500 #436EEE #DC143C] + background_colors: %I[eastern_blue eastern_blue], + label_colors: %I[yellow green blue red maroon grey \ +bittersweet light_pink violet bright_turquoise spring_green green_yellow orange misty_rose\ +silver falu_red royal_blue crimson] }.freeze OREO = { marker_color: 'white', font_color: 'white', - background_colors: %w[#0083a3 #0083a3], - label_colors: %w[#e6194b #3cb44b #ffe119 #0082c8 #f58231 #911eb4 #008080 #e6beff #aa6e28] + background_colors: %I[eastern_blue eastern_blue], + label_colors: %I[crimson fruit_salad lemon bondi_blue sun dark_orchid teal mauve hot_toddy] }.freeze RITA = { marker_color: 'black', font_color: 'black', - background_colors: %w[#d1edf5 white], - label_colors: %w[#46f0f0 #f032e6 #d2f53c #fabebe #008080 #e6beff #aa6e28 #fffac8 #800000] + background_colors: %I[pattens_blue white], + label_colors: %I[turquoise razzle_dazzle_rose pear your_pink teal mauve hot_toddy lemon_chiffon maroon] }.freeze # Plain White back ground with no gradient. CLASSIC_WHITE = { marker_color: 'black', font_color: 'black', - background_colors: %w[white white], - label_colors: %I[strong_blue vivid_orange dark_lime_green strong_red slightly_desaturated_violet dark_grey strong_yellow strong_cyan yellow maroon grey] + background_colors: %I[white white], + label_colors: %I[strong_blue vivid_orange dark_lime_green strong_red slightly_desaturated_violet \ +dark_grey strong_yellow strong_cyan yellow maroon grey] + }.freeze end end