Class: OoxmlParser::ThemeColors
- Inherits:
-
Object
- Object
- OoxmlParser::ThemeColors
- Defined in:
- lib/ooxml_parser/common_parser/common_data/colors/theme_colors.rb
Class Attribute Summary collapse
-
.list ⇒ Hash
List of colors.
Class Method Summary collapse
Class Attribute Details
.list ⇒ Hash
Returns list of colors.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/theme_colors.rb', line 6 def list @list end |
Class Method Details
.parse_color_theme(theme, tint) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/theme_colors.rb', line 8 def parse_color_theme(theme, tint) themes_array = ThemeColors.list.to_a # TODO: if no swap performed - incorrect color parsing. But don't know why it needed themes_array[0], themes_array[1] = themes_array[1], themes_array[0] themes_array[2], themes_array[3] = themes_array[3], themes_array[2] hls = HSLColor.rgb_to_hsl(themes_array[theme][1]) tint = 0 if tint.nil? hls.calculate_rgb_with_tint(tint) end |