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

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

Overview

An RGB color.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RgbColor

Returns a new instance of RgbColor.



4304
4305
4306
# File 'lib/google/apis/docs_v1/classes.rb', line 4304

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)


4292
4293
4294
# File 'lib/google/apis/docs_v1/classes.rb', line 4292

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)


4297
4298
4299
# File 'lib/google/apis/docs_v1/classes.rb', line 4297

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)


4302
4303
4304
# File 'lib/google/apis/docs_v1/classes.rb', line 4302

def red
  @red
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4309
4310
4311
4312
4313
# File 'lib/google/apis/docs_v1/classes.rb', line 4309

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