Class: Google::Apis::FusiontablesV1::StyleFunction::Gradient::Color

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/fusiontables_v1/classes.rb,
generated/google/apis/fusiontables_v1/representations.rb,
generated/google/apis/fusiontables_v1/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



581
582
583
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 581

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

Instance Attribute Details

#colorString

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

Returns:

  • (String)


574
575
576
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 574

def color
  @color
end

#opacityFloat

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

Returns:

  • (Float)


579
580
581
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 579

def opacity
  @opacity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



586
587
588
589
# File 'generated/google/apis/fusiontables_v1/classes.rb', line 586

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