Class: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/fusiontables_v2/classes.rb,
generated/google/apis/fusiontables_v2/representations.rb,
generated/google/apis/fusiontables_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Color

Returns a new instance of Color.


638
639
640
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 638

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#colorString

Color in #RRGGBB format. Corresponds to the JSON property color

Returns:

  • (String)

631
632
633
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 631

def color
  @color
end

#opacityFloat

Opacity of the color: 0.0 (transparent) to 1.0 (opaque). Corresponds to the JSON property opacity

Returns:

  • (Float)

636
637
638
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 636

def opacity
  @opacity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


643
644
645
646
# File 'generated/google/apis/fusiontables_v2/classes.rb', line 643

def update!(**args)
  @color = args[:color] if args.key?(:color)
  @opacity = args[:opacity] if args.key?(:opacity)
end