Class: Uniword::Drawingml::ThemeColorBase

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/uniword/drawingml/color_scheme.rb

Overview

Base class for theme color elements

Instance Method Summary collapse

Instance Method Details

#rgb=(val) ⇒ Object

Set RGB value



40
41
42
43
# File 'lib/uniword/drawingml/color_scheme.rb', line 40

def rgb=(val)
  @srgb_clr = SrgbColor.new(val: val)
  @sys_clr = nil
end

#system_color=(type:, last_clr:) ⇒ Object

Set system color



46
47
48
49
# File 'lib/uniword/drawingml/color_scheme.rb', line 46

def system_color=(type:, last_clr:)
  @sys_clr = SysColor.new(val: type, last_clr: last_clr)
  @srgb_clr = nil
end

#valueObject

Get the effective color value



35
36
37
# File 'lib/uniword/drawingml/color_scheme.rb', line 35

def value
  @srgb_clr&.val || @sys_clr&.last_clr || "000000"
end