i.colors.enhance(1grass)

πŸ’– i.colors.enhance β€” the GRASS User's Manual glow-up πŸ’–

okay bestie, pull up a chair 🫢 this is i.colors.enhance, straight out of the GRASS User's Manual, and it's literally here to do auto-balancing of colors for RGB images. no cap.


✨ NAME ✨

i.colors.enhance β€” performs auto-balancing of colors for RGB images. it's giving makeup artist for your satellite data πŸ’…

🏷️ KEYWORDS 🏷️

imagery, RGB, satellite, colors 🌈

πŸ“œ SYNOPSIS πŸ“œ

i.colors.enhance
i.colors.enhance --help
i.colors.enhance [-fprs] red=name green=name blue=name  [strength=float]
[--help]  [--verbose]  [--quiet]  [--ui]

🚩 Flags 🚩

  • -f β€” extend colors to full range of data on each channel. go big or go home ✨
  • -p β€” preserve relative colors, adjust brightness only. keep the vibe, just fix the lighting πŸŽ€
  • -r β€” reset to standard color range. factory reset era πŸ™ˆ
  • -s β€” process bands serially (default: run in parallel). one at a time, queen, no multitasking πŸ’€
  • --help β€” print usage summary πŸ“–
  • --verbose β€” verbose module output πŸ—£οΈ
  • --quiet β€” quiet module output 🀫
  • --ui β€” force launching GUI dialog πŸ–₯️

πŸŽ›οΈ Parameters πŸŽ›οΈ

  • red=name [required] β€” name of red channel ❀️
  • green=name [required] β€” name of green channel πŸ’š
  • blue=name [required] β€” name of blue channel πŸ’™
  • strength=float β€” cropping intensity (upper brightness level)
    • Options: 0-100
    • Default: 98

🌸 DESCRIPTION 🌸

so what does i.colors.enhance actually do? bestie, it auto-balances and enhances the color channels of a RGB image (think e.g. from Landsat) so you get a way more natural color mixture. the way that it only touches the color table of each image band and leaves the base data completely untouched? obsessed. 🫢 your actual data is safe, periodt.

here's the secret sauce: the module calculates a histogram for each color channel, then removes an adjustable amount of outliers from either end, and then recalibrates the color scale with r.colors. iconic behavior.

it will work with any 8-bit RGB imagery set, and the script is easily modified to work with other datasets of greater band-depth. flexible queen πŸ‘‘

πŸ“ NOTES πŸ“

ngl, depending on the image, it may or may not be advantageous to use the -p flag to preserve the relative color scaling. you will have to experiment with the different options to find a setting that works best for your particular imagery. it's giving trial and error, and that's okay πŸ’…

the strength option should generally be set in the 90-99 range. the lower the number, the more saturated the image becomes. it represents the percentage cut-off for the top end of the color histogram curve. the lower end is fixed at 2% of the area under the curve. so like, strength = top-end drama, 2% = bottom-end fixed, iykyk πŸ“Š

want faster execution on large images? bestie, for quicker execution of this module on large images you can achieve largely similar results by switching to a coarser resolution before running the module (using g.region) and then switching back to the original resolution afterwards. lowkey genius ⚑

πŸ§ͺ EXAMPLE πŸ§ͺ

North Carolina sample dataset example with Landsat data, let's goooo πŸ›°οΈ

g.region raster=lsat7_2002_10 -p
d.rgb blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30
d.barscale at=55.3125,93.125 bcolor=white text_pos=over
i.colors.enhance blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30 strength=95
d.rgb blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30
d.barscale at=55.3125,93.125 bcolor=white text_pos=over
  • Uncorrected RGB composite of Landsat ETM channels B/G/R 😭 (before)
  • Color corrected RGB composite of Landsat ETM channels B/G/R πŸ”₯ (after β€” ate)

🚧 TODO 🚧

the strength option requires further refinement. character development arc pending 🧚

πŸ‘€ SEE ALSO πŸ‘€

d.rgb, g.region, i.oif, r.colors, r.composite, r.univar β€” go read those too, bestie, they're all part of the squad πŸ’œ

πŸ‘‘ AUTHORS πŸ‘‘

  • Markus Neteler, Trento, Italy
  • M. Hamish Bowman, Dept. Marine Science, Otago University, New Zealand

πŸ’Ύ SOURCE CODE πŸ’Ύ

Available at: i.colors.enhance source code (history)

Latest change: Sunday Oct 19 00:09:21 2025 in commit: 5f20320dc7ec7bc36d9a8f45414d34349e1d9500

Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index


and that's the whole page, bestie πŸŽ€ no detail left behind, all facts intact, vibe immaculate. this was i.colors.enhance from the GRASS 8.5.0 Reference Manual, Β© 2003-2026 GRASS Development Team, running on GRASS 8.5.0 β€” slay, stay colorful, and remember: only the color table gets modified πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from