OpenLayers v4.0.1 API - Class: Fill

# Class: Fill

This documentation is for OpenLayers v4.0.1. The latest is v.

## ol.style.Fill

Set fill style for vector features.

#### new ol.style.Fill(opt_options)

src/ol/style/fill.js, line 15

  Name | Type | Description
  --- | --- | ---

  `options`

  Options.

  Name | Type | Description
  --- | --- | ---
  `color` | ol.Color | ol.ColorLike | undefined | A color, gradient or pattern. See `ol.color` and `ol.colorlike` for possible formats. Default null; if null, the Canvas/renderer default black will be used.

### Methods

#### clone(){ol.style.Fill}

src/ol/style/fill.js, line 38

  Clones the style. The color is not cloned if it is an `ol.ColorLike`.

  ##### Returns:

  The cloned style.

#### getColor(){ol.Color|ol.ColorLike}

src/ol/style/fill.js, line 51

  Get the fill color.

  ##### Returns:

  Color.

#### setColor(color)

src/ol/style/fill.js, line 62

  Set the color.

  Name | Type | Description
  --- | --- | ---
  `color` | ol.Color | ol.ColorLike | Color.