Color gradient
Encyclopedia
In computer graphics, a color gradient (sometimes called a color ramp or color progression) specifies a range of position-dependent color
s, usually used to fill a region. For example, many window managers allow the screen background to be specified as a gradient. The colors produced by a gradient vary continuously with position, producing smooth color transitions.
A linear color gradient is specified by two points, and a color at each point. The colors along the line through those points are calculated using linear interpolation
, then extended perpendicular to that line. In digital imaging
systems, colors are typically interpolated in an RGB color space
, often using gamma compressed RGB color values, as opposed to linear.
A circular gradient is specified as a circle
that has one color and a focus (the center of the circle) that has another. Colors are calculated by linear interpolation based on distance from the focus.
Color
Color or colour is the visual perceptual property corresponding in humans to the categories called red, green, blue and others. Color derives from the spectrum of light interacting in the eye with the spectral sensitivities of the light receptors...
s, usually used to fill a region. For example, many window managers allow the screen background to be specified as a gradient. The colors produced by a gradient vary continuously with position, producing smooth color transitions.
Linear gradients
A linear color gradient is specified by two points, and a color at each point. The colors along the line through those points are calculated using linear interpolation
Linear interpolation
Linear interpolation is a method of curve fitting using linear polynomials. Lerp is an abbreviation for linear interpolation, which can also be used as a verb .-Linear interpolation between two known points:...
, then extended perpendicular to that line. In digital imaging
Digital imaging
Digital imaging or digital image acquisition is the creation of digital images, typically from a physical scene. The term is often assumed to imply or include the processing, compression, storage, printing, and display of such images...
systems, colors are typically interpolated in an RGB color space
RGB color space
An RGB color space is any additive color space based on the RGB color model. A particular RGB color space is defined by the three chromaticities of the red, green, and blue additive primaries, and can produce any chromaticity that is the triangle defined by those primary colors...
, often using gamma compressed RGB color values, as opposed to linear.
Circular gradients
A circular gradient is specified as a circle
Circle
A circle is a simple shape of Euclidean geometry consisting of those points in a plane that are a given distance from a given point, the centre. The distance between any of the points and the centre is called the radius....
that has one color and a focus (the center of the circle) that has another. Colors are calculated by linear interpolation based on distance from the focus.
See also
- Image gradientImage gradientAn image gradient is a directional change in the intensity or color in an image. Image gradients may be used to extract information from images....
- Color banding
- PosterizationPosterizationPosterization of an image entails conversion of a continuous gradation of tone to several regions of fewer tones, with abrupt changes from one tone to another. This was originally done with photographic processes to create posters...