ColorRange class

ColorRange class

Represents a range of colors using HSB representation of RGB color.

The ColorRange type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the ColorRange class.
init Initializes a new instance of the ColorRange class with a specified exact color.

Properties

Property Description
is_empty The flag indicating whether only the empty color is in range.
max_brightness The ending brightness value. The brightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.
max_hue The ending hue value, in degrees.
max_saturation The ending saturation value.
min_brightness The starting brightness value.
min_hue The starting hue value, in degrees.
min_saturation The starting saturation value. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated.

Example

import groupdocs.watermark.search.searchcriteria as gws_sc

# Create a color range for foreground colors
foreground_range = gws_sc.ColorRange()
foreground_range.min_hue = -5
foreground_range.max_hue = 10
foreground_range.min_brightness = 0.01
foreground_range.max_brightness = 0.99

Guides

Task guides that use ColorRange:

See Also