Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Definitions  



1.1  Strict definition  







2 Types  



2.1  Dimension  





2.2  Shapes  



2.2.1  Axial gradients  





2.2.2  Radial gradients  





2.2.3  Conic gradients  





2.2.4  Other shapes  







2.3  Color space  



2.3.1  Effect of color space  









3 Examples  



3.1  HSV rainbow  







4 Applications  





5 See also  





6 References  














Color gradient






Azərbaycanca
Deutsch
Español
Français
Nederlands

Norsk bokmål
Polski
Português
Русский
Українська
Tiếng Vit

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


A linear, or axial, color gradient

Incolor science, a color gradient (also known as a color ramp or a color progression) specifies a range of position-dependent colors, usually used to fill a region.

In assigning colors to a set of values, a gradient is a continuous colormap, a type of color scheme. In computer graphics, the term swatch[1] has come to mean a palette of active colors.

Definitions[edit]

Strict definition[edit]

A colormap[4] is a function which associate a real value r with point c in color space

which is defined by:

where:

Types[edit]

Criteria for classification:

Dimension[edit]

Shapes[edit]

Axial gradients[edit]

An axial color gradient, with a white line segment connecting the two points

An axial color gradient (sometimes also called 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. CSS and SVG both support linear gradients.[8][9]

Radial gradients[edit]

A radial color gradient

A radial gradient is specified as a circle that has one color at the edge and another at the center. Colors are calculated by linear interpolation based on distance from the center. This can be used to approximate the diffuse reflection of light from a point source by a sphere.[citation needed] Both CSS and SVG support radial gradients.[10][11]

Conic gradients[edit]

conic gradient

Conic or conical gradients are gradients with color transitions rotated around a center point (rather than radiating from the center). Example conic gradients include pie charts and color wheels.[12] Conic gradients are sometimes called "sweep gradients" (for example in the OpenType specification) or angular gradients.

Other shapes[edit]

Invector graphics polygon meshes can be used, e.g., Adobe Illustrator supported gradient meshes.

Color space[edit]

Effect of color space[edit]

The appearance of a gradient not only varies by the color themselves, but also by the color space the calculation is performed in. The problem usually becomes important for two reasons:

A "linear" blend would match physical light blending and has been the standard in game engines for a long time.[16] On the web, however, it has long been neglected for both color gradients and image scaling.[17] Such a blend still has a subtle difference from one done in a perceptually-uniform color space.[18]

Examples[edit]

HSV rainbow[edit]

Applications[edit]

See also[edit]

References[edit]

  • ^ Diverging Color Maps for Scientific Visualization - Kenneth Moreland
  • ^ The Good, the Bad, and the Ugly: A Theoretical Framework for the Assessment of Continuous Colormaps by Roxana Bujack, Terece L. Turton, Francesca Samsel, Colin Ware
  • ^ which-color-scale-to-use-in-data-vis by Lisa Charlotte Rost
  • ^ Fabio Crameri: Scientific colour maps
  • ^ A survey and task-based quality assessment of static 2D colormaps Author(s): Bernard, Jürgen; Steiger, Martin; Mittelstädt, Sebastian; Thum, Simon; Keim, Daniel; Kohlhammer, Jörn, In Kao, David L. (Ed.) ; Society for Imaging Science and Technology -IS&T-; Society of Photo-Optical Instrumentation Engineers -SPIE-, Bellingham/Wash.: Visualization and Data Analysis 2015 : 9–11 February 2015, San Francisco, California Bellingham, WA: SPIE, 2015 (Proceedings of SPIE 9397) ISBN 9781628414875
  • ^ Linear Gradients in "CSS Image Values and Replaced Content Module Level 3", W3C Candidate Recommendation, April 2012
  • ^ Linear Gradients in "SVG 1.1 (Second Edition)", W3C Recommendation, August 2011
  • ^ Radial Gradients in "CSS Image Values and Replaced Content Module Level 3", W3C Candidate Recommendation, April 2012
  • ^ Radial Gradients in "SVG 1.1 (Second Edition)", W3C Recommendation, August 2011
  • ^ mozilla docs: CSS conic-gradient
  • ^ Minute Physics (March 20, 2015). "Computer Color is Broken". YouTube. Archived from the original on December 21, 2021.
  • ^ Novak, John (September 21, 2016). "What every coder should know about gamma".
  • ^ Zeileis, Achim; Fisher, Jason C.; Hornik, Kurt; Ihaka, Ross; McWhite, Claire D.; Murrell, Paul; Stauffer, Reto; Wilke, Claus O. (2019). "colorspace: A Toolbox for Manipulating and Assessing Colors and Palettes". Journal of Statistical Software. 96. arXiv:1903.06490. doi:10.18637/jss.v096.i01.
  • ^ "Chapter 24. The Importance of Being Linear". NVIDIA Developer.
  • ^ "Web color is still broken".
  • ^ "How software gets color wrong". bottosson.github.io. December 3, 2020.
  • ^ gnuplot docs 4.2 node167: Color box[permanent dead link]
  • ^ Eisenberg, J. David (2002). SVG Essentials. O'Reilly Media. p. 107. ISBN 0-596-00223-8.

  • Retrieved from "https://en.wikipedia.org/w/index.php?title=Color_gradient&oldid=1227412657"

    Category: 
    Computer graphics
    Hidden categories: 
    All articles with dead external links
    Articles with dead external links from April 2024
    Articles with permanently dead external links
    Articles with short description
    Short description matches Wikidata
    Use American English from March 2021
    All Wikipedia articles written in American English
    Use mdy dates from March 2021
    All articles with unsourced statements
    Articles with unsourced statements from September 2014
    Commons category link is on Wikidata
     



    This page was last edited on 5 June 2024, at 15:42 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki