diff --git a/source/_integrations/color_extractor.markdown b/source/_integrations/color_extractor.markdown new file mode 100644 index 00000000000..8664397abc9 --- /dev/null +++ b/source/_integrations/color_extractor.markdown @@ -0,0 +1,94 @@ +--- +title: Color Extractor +description: Instructions how to integrate the Color Extractor into Home Assistant. +ha_release: 0.118 +ha_category: + - Image Processing +ha_domain: color_extractor +ha_codeowners: + - '@GenericStudent' +--- + +The `color_extractor` integration will extract the predominant color from a given image and apply that color to a target light. +Useful as part of an automation. + +## Configuration + +To enable the `color_extractor` service in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +color_extractor: +``` + +## Services + +Because `color_extractor.turn_on` will then call `light.turn_on`, you can pass any valid [`light.turn_on`](/integrations/light#service-lightturn_on) parameters (`rgb_color` will be set for you though) as those will be passed along. + +Passing the key `color_extract_url` to the service call will download the linked image and extract the predominant color from it. Passing the key `color_extract_path` to the service call will process the image file from local storage instead. `color_extract_url` and `color_extract_path` are exclusive and cannot be used together. + +|Key | Example | Description | +|---------------------|---------------------------------------|-------------------------------------------------------------------------------| +|`color_extract_url` | `https://example.com/images/logo.png` | The full URL (including schema, `http://`, `https://`) of the image to process| +|`color_extract_path` | `/tmp/album.png` | The full path to the image file on local storage we'll process | +|`entity_id` | `light.shelf_leds` | The RGB capable light we'll set the color of | + +