Lighter
Details
- Lighter can be used to create a lighter version of a color or an image.
- Lighter[color,1] gives white. »
- Lighter[color,0] gives color. »
- Lighter[color] is equivalent to Lighter[color,1/3]. »
- Lighter[color,f] for values of f outside the range 0 to 1 are clipped.
- Lighter[image] works with 2D as well as 3D images.
- Lighter[{col1,col2,…},…] gives lighter versions of each of the coli. »
- When applied to color, Lighter always returns an RGBColor.
- When applied to color images, Lighter always returns an RGB image.
- Lighter does not affect the opacity of a color or an image. »
Examples
open all close allBasic Examples (3)
Graphics[{Lighter[Red], Disk[]}]Graphics3D[{Lighter[Green], Sphere[]}]Specify how much the color should be lightened by using a fraction:
Graphics[{Lighter[Blue, #], Disk[]}]& /@ {.1, .5, .8}Lighter[[image]]Scope (9)
Data (6)
Lighter version of a color:
Lighter[RGBColor[1, 0, 0]]Lighter version of a 2D grayscale image:
Lighter[[image]]Lighter[[image]]Lighter[\!\(\*VideoBox[""]\)]Lighter version of a 3D image:
Lighter[[image]]Lighter automatically threads over colors:
Lighter[{Red, Green, Blue}, 1 / 2]Parameters (3)
The default lightening fraction is
:
Lighter[Red] == Lighter[Red, 1 / 3]{Graphics[{Lighter[Red], Disk[]}], Graphics[{Lighter[Red, 1 / 3], Disk[]}]}Specify different darkening fractions:
Table[Graphics[{Lighter[Red, i], Disk[]}], {i, {0.2, 0.4, 0.6, 0.8}}]With a lightening fraction of zero, the color is unchanged:
Lighter[Blue, 0] == Blue{Graphics[{Lighter[Blue, 0], Disk[]}], Graphics[{Blue, Disk[]}]}With a lightening fraction of one, the color becomes white:
Lighter[RGBColor[0, 0, 1], 1] == RGBColor[1, 1, 1]{Graphics[{Lighter[Blue, 1], Disk[]}, Background -> Black], Graphics[{White, Disk[]}, Background -> Black]}Applications (4)
Use Lighter to construct ColorFunction for plots:
Plot3D[y Sin[x ^ 2 + y ^ 2], {x, -3, 3}, {y, -3, 3}, ColorFunction -> (Lighter[Orange, #3]&), Mesh -> None, PlotPoints -> 40]DensityPlot[Sin[x]Sin[y], {x, -4, 4}, {y, -4, 4}, ColorFunction -> (Lighter[Orange, #]&)]Use Darker and Lighter values of a particular hue as a color function:
ContourPlot[Sin[x]Sin[y], {x, 0, 2Pi}, {y, 0, 2Pi}, ColorFunction -> (If[# < 0, Darker[Blue, Abs[#]], Lighter[Red, #]]&), ColorFunctionScaling -> False]Make a dark, starry sky brighter:
Lighter[[image], 1]Enhance a dark region of an image:
i = [image];mask = ColorNegate@Binarize[i, .1]ImageCompose[i, SetAlphaChannel[ Lighter[i, 1], mask]]Properties & Relations (5)
Lighter of a color is always returned as an RGBColor:
Lighter[CMYKColor[0, 1, 1, 0]]%//InputFormThe opacity value is unaffected by Lighter:
Lighter[RGBColor[1, 0, 0, .4]]Lighter is a special case of Blend:
{Lighter[Blue, 1 / 3], Blend[{Blue, White}, 1 / 3]}Lighter and Darker are not commutative:
Darker[Lighter[Red, .5], .5]Lighter[Darker[Red, .5], .5]Lighter for images is a special case of ImageAdjust:
{Lighter[[image], 0.5], ImageAdjust[[image], {0, 0.5}]}Possible Issues (3)
Values outside of the 0–1 range will be clipped:
Graphics[Table[{Lighter[Blue, i], EdgeForm[Opacity[.1]], Disk[{5i, 0}]}, {i, 0 - 1 / 4, 1 + 1 / 4, 1 / 4}]]Some colors may look faded during the lightening:
Graphics[Table[{Lighter[Brown, i], EdgeForm[Opacity[.1]], Disk[{7i, 0}]}, {i, 0, 1, 1 / 6}]]Lighter behaves differently when applied to a color and an image pixel of the same color:
{Graphics[{RGBColor[1, 0.5, 0], Rectangle[]}, ImageSize -> 100],
Image[{{RGBColor[1, 0.5, 0]}}, ImageSize -> 100]}{Graphics[{Lighter[RGBColor[1, 0.5, 0]], Rectangle[]}, ImageSize -> 100],
Lighter[Image[{{RGBColor[1, 0.5, 0]}}, ImageSize -> 100]]}Interactive Examples (1)
See Also
Darker Blend GrayLevel ColorSlider ImageAdjust LightDarkSwitched
Function Repository: PalerColor
History
Introduced in 2007 (6.0) | Updated in 2012 (9.0) ▪ 2014 (10.0) ▪ 2021 (13.0)
Text
Wolfram Research (2007), Lighter, Wolfram Language function, https://reference.wolfram.com/language/ref/Lighter.html (updated 2021).
CMS
Wolfram Language. 2007. "Lighter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Lighter.html.
APA
Wolfram Language. (2007). Lighter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Lighter.html
BibTeX
@misc{reference.wolfram_2026_lighter, author="Wolfram Research", title="{Lighter}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Lighter.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_lighter, organization={Wolfram Research}, title={Lighter}, year={2021}, url={https://reference.wolfram.com/language/ref/Lighter.html}, note=[Accessed: 12-June-2026]}