Class: Google::Apis::DocsV1::RgbColor

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

Overview

An RGB color.

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) ⇒ RgbColor

Returns a new instance of RgbColor



3852
3853
3854
# File 'generated/google/apis/docs_v1/classes.rb', line 3852

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

Instance Attribute Details

#blueFloat

The blue component of the color, from 0.0 to 1.0. Corresponds to the JSON property blue

Returns:

  • (Float)


3840
3841
3842
# File 'generated/google/apis/docs_v1/classes.rb', line 3840

def blue
  @blue
end

#greenFloat

The green component of the color, from 0.0 to 1.0. Corresponds to the JSON property green

Returns:

  • (Float)


3845
3846
3847
# File 'generated/google/apis/docs_v1/classes.rb', line 3845

def green
  @green
end

#redFloat

The red component of the color, from 0.0 to 1.0. Corresponds to the JSON property red

Returns:

  • (Float)


3850
3851
3852
# File 'generated/google/apis/docs_v1/classes.rb', line 3850

def red
  @red
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3857
3858
3859
3860
3861
# File 'generated/google/apis/docs_v1/classes.rb', line 3857

def update!(**args)
  @blue = args[:blue] if args.key?(:blue)
  @green = args[:green] if args.key?(:green)
  @red = args[:red] if args.key?(:red)
end