Difference between revisions of "love.graphics.setColorMode"
m (Changed template (oldin ->newinoldin).) |
|||
Line 10: | Line 10: | ||
=== Returns === | === Returns === | ||
Nothing. | Nothing. | ||
+ | === Examples === | ||
+ | Images (etc) will be affected by the current color: | ||
+ | <source lang="lua"> | ||
+ | love.graphics.setColorMode('modulate') | ||
+ | </source> | ||
+ | |||
+ | Replace color mode. Images (etc) will not be affected by current color: | ||
+ | <source lang="lua"> | ||
+ | love.graphics.setColorMode('replace') | ||
+ | </source> | ||
+ | |||
+ | Colorize images (etc) with the current color. While 'modulate' works like a filter that absorbs colors that differ from the current color (possibly to a point where a color channel is entirely absorbed), 'combine' tints the image in a way that preserves a hint of the original colors: | ||
+ | <source lang="lua"> | ||
+ | love.graphics.setColorMode('combine') | ||
+ | </source> | ||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] |
Revision as of 20:26, 23 October 2021
Available since LÖVE 0.2.0 and removed in LÖVE 0.9.0 |
This function is not supported in earlier or later versions. |
Sets the color mode (which controls how images are affected by the current color).
Contents
Function
Synopsis
love.graphics.setColorMode( mode )
Arguments
ColorMode mode
- The color mode to use.
Returns
Nothing.
Examples
Images (etc) will be affected by the current color:
love.graphics.setColorMode('modulate')
Replace color mode. Images (etc) will not be affected by current color:
love.graphics.setColorMode('replace')
Colorize images (etc) with the current color. While 'modulate' works like a filter that absorbs colors that differ from the current color (possibly to a point where a color channel is entirely absorbed), 'combine' tints the image in a way that preserves a hint of the original colors:
love.graphics.setColorMode('combine')
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info