# Class: Fill

This documentation is for OpenLayers v10.9.0. The latest is v.

## ol/style/Fill~Fill

    import Fill from 'ol/style/Fill.js';

Set fill style for vector features.

#### new Fill(options)

style/Fill.js, line 24

  Name | Type | Description
  --- | --- | ---
  `color` | Color | ColorLike | PatternDescriptor | null (defaults to null) | A color, gradient or pattern. See `Color` and `ColorLike` for possible formats. For polygon fills (not for `RegularShape` fills), a pattern can also be provided as `PatternDescriptor`. Default null; if null, the Canvas/renderer default black will be used.

### Methods

#### clone(){Fill}

style/Fill.js, line 52

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

  ##### Returns:

  The cloned style.

#### getColor(){Color | ColorLike | PatternDescriptor | null}

style/Fill.js, line 64

  Get the fill color.

  ##### Returns:

  Color.

#### setColor(color)

style/Fill.js, line 74

  Set the color.

  Name | Type | Description
  --- | --- | ---
  `color` | Color | ColorLike | PatternDescriptor | null | Color.