Class: Uniword::Drawingml::ThemeColorBase
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Uniword::Drawingml::ThemeColorBase
- Defined in:
- lib/uniword/drawingml/color_scheme.rb
Overview
Base class for theme color elements
Direct Known Subclasses
Accent1Color, Accent2Color, Accent3Color, Accent4Color, Accent5Color, Accent6Color, Dk1Color, Dk2Color, FolHlinkColor, HlinkColor, Lt1Color, Lt2Color
Instance Method Summary collapse
-
#rgb=(val) ⇒ Object
Set RGB value.
-
#system_color=(type:, last_clr:) ⇒ Object
Set system color.
-
#value ⇒ Object
Get the effective color value.
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 |
#value ⇒ Object
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 |