Module: ActiveFrontendHelper
- Defined in:
- app/helpers/active_frontend_helper.rb
Instance Method Summary collapse
- #colors(opacity = 1) ⇒ Object
-
#colors_brand(opacity = 1) ⇒ Object
rubocop:disable Metrics/MethodLength.
-
#colors_global(opacity = 1) ⇒ Object
rubocop:enable Metrics/MethodLength.
- #colors_grayscale(opacity = 1) ⇒ Object
Instance Method Details
#colors(opacity = 1) ⇒ Object
49 50 51 52 |
# File 'app/helpers/active_frontend_helper.rb', line 49 def colors(opacity = 1) colors_global(opacity).merge(colors_brand(opacity)) .merge(colors_grayscale(opacity)) end |
#colors_brand(opacity = 1) ⇒ Object
rubocop:disable Metrics/MethodLength
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/helpers/active_frontend_helper.rb', line 4 def colors_brand(opacity = 1) { lime: { rgba: "rgba(164,217,111,#{opacity})", hex: '#A4D96F' }, green: { rgba: "rgba(52,208,102,#{opacity})", hex: '#34D066' }, teal: { rgba: "rgba(66,223,193,#{opacity})", hex: '#42DFC1' }, sky: { rgba: "rgba(19,190,255,#{opacity})", hex: '#13BEFF' }, blue: { rgba: "rgba(50,156,255,#{opacity})", hex: '#329CFF' }, indigo: { rgba: "rgba(146,112,226,#{opacity})", hex: '#9270E2' }, purple: { rgba: "rgba(194,111,212,#{opacity})", hex: '#C26FD4' }, pink: { rgba: "rgba(240,129,143,#{opacity})", hex: '#F0818F' }, red: { rgba: "rgba(241,91,83,#{opacity})", hex: '#F15B53' }, brown: { rgba: "rgba(222,163,103,#{opacity})", hex: '#DEA367' }, orange: { rgba: "rgba(252,174,70,#{opacity})", hex: '#FCAE46' }, yellow: { rgba: "rgba(248,214,72,#{opacity})", hex: '#F8D648' } } end |
#colors_global(opacity = 1) ⇒ Object
rubocop:enable Metrics/MethodLength
38 39 40 41 42 43 44 45 46 47 |
# File 'app/helpers/active_frontend_helper.rb', line 38 def colors_global(opacity = 1) available_colors = colors_brand(opacity) { primary: available_colors[:blue], secondary: available_colors[:green], tertiary: available_colors[:red], quaditiary: available_colors[:yellow] } end |
#colors_grayscale(opacity = 1) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/helpers/active_frontend_helper.rb', line 21 def colors_grayscale(opacity = 1) { transparent: { rgba: 'rgba(0,0,0,0)', hex: '#FFFFFF' }, dark_black: { rgba: "rgba(37,49,62,#{opacity})", hex: '#25313E' }, black: { rgba: "rgba(44,58,73,#{opacity})", hex: '#2C3A49' }, light_black: { rgba: "rgba(51,67,83,#{opacity})", hex: '#334353' }, dark_gray: { rgba: "rgba(99,125,144,#{opacity})", hex: '#637D90' }, gray: { rgba: "rgba(120,144,162,#{opacity})", hex: '#7890A2' }, light_gray: { rgba: "rgba(143,163,178,#{opacity})", hex: '#8FA3B2' }, dark_haze: { rgba: "rgba(229,234,244,#{opacity})", hex: '#E5EAF4' }, haze: { rgba: "rgba(238,241,250,#{opacity})", hex: '#EEF1FA' }, light_haze: { rgba: "rgba(248,249,253,#{opacity})", hex: '#F8F9FD' }, white: { rgba: "rgba(255,255,255,#{opacity})", hex: '#FFFFFF' } } end |