Class: Imagekitio::Models::SolidColorOverlayTransformation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/imagekitio/models/solid_color_overlay_transformation.rb

Defined Under Namespace

Modules: Gradient, Height, Radius, Width

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(alpha: nil, background: nil, gradient: nil, height: nil, radius: nil, width: nil) ⇒ Object

Some parameter documentations has been truncated, see Imagekitio::Models::SolidColorOverlayTransformation for more details.

Parameters:

  • (defaults to: nil)

    Specifies the transparency level of the overlaid solid color layer. Supports int

  • (defaults to: nil)

    Specifies the background color of the solid color overlay. Accepts an RGB hex co

  • (defaults to: nil)

    Creates a linear gradient with two colors. Pass true for a default gradient, o

  • (defaults to: nil)

    Controls the height of the solid color overlay. Accepts a numeric value or an ar

  • (defaults to: nil)

    Specifies the corner radius of the solid color overlay.

  • (defaults to: nil)

    Controls the width of the solid color overlay. Accepts a numeric value or an ari



# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 58


Instance Attribute Details

#alphaFloat?

Specifies the transparency level of the overlaid solid color layer. Supports integers from 1 to 9.

Returns:



11
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 11

optional :alpha, Float

#backgroundString?

Specifies the background color of the solid color overlay. Accepts an RGB hex code (e.g., FF0000), an RGBA code (e.g., FFAABB50), or a color name.

Returns:



18
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 18

optional :background, String

#gradientBoolean, ...

Creates a linear gradient with two colors. Pass true for a default gradient, or provide a string for a custom gradient. Only works if the base asset is an image. See [gradient](imagekit.io/docs/effects-and-enhancements#gradient—e-gradient).

Returns:



27
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 27

optional :gradient, union: -> { Imagekitio::SolidColorOverlayTransformation::Gradient }

#heightFloat, ...

Controls the height of the solid color overlay. Accepts a numeric value or an arithmetic expression. Learn about [arithmetic expressions](imagekit.io/docs/arithmetic-expressions-in-transformations).

Returns:



35
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 35

optional :height, union: -> { Imagekitio::SolidColorOverlayTransformation::Height }

#radiusFloat, ...

Specifies the corner radius of the solid color overlay.

  • Single value (positive integer): Applied to all corners (e.g., 20).

  • max: Creates a circular or oval shape.

  • Per-corner array: Provide four underscore-separated values representing top-left, top-right, bottom-right, and bottom-left corners respectively (e.g., 10_20_30_40). See [Radius](imagekit.io/docs/effects-and-enhancements#radius—r).

Returns:



48
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 48

optional :radius, union: -> { Imagekitio::SolidColorOverlayTransformation::Radius }

#widthFloat, ...

Controls the width of the solid color overlay. Accepts a numeric value or an arithmetic expression (e.g., bw_mul_0.2 or bh_div_2). Learn about [arithmetic expressions](imagekit.io/docs/arithmetic-expressions-in-transformations).

Returns:



56
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 56

optional :width, union: -> { Imagekitio::SolidColorOverlayTransformation::Width }

Class Method Details

.variantsArray(Float, Symbol, :max, String)

Returns:



# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 87