r.his(1grass)

πŸ’– r.his πŸ’–

okay bestie, welcome to the r.his page from the GRASS User's Manual ✨ this one's a total glow-up tool for your raster maps and i'm so excited to walk you through it 🫢


🌈 NAME 🌈

r.his β€” it generates red, green and blue (RGB) raster map layers that combine hue, intensity and saturation (HIS) values from input raster map layers you pick. it's giving color-mixing sorcery, no cap πŸ’…


🏷️ KEYWORDS 🏷️

raster, color transformation, RGB, HIS, IHS β€” that's the vibe check right there ⭐


✨ SYNOPSIS ✨

r.his
r.his --help
r.his [-c] hue=string  [intensity=string]   [saturation=string]
red=string green=string blue=string  [bgcolor=name]   [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags πŸŽ€

  • -c β€” use the colors from the color tables for NULL values πŸ’–
  • --overwrite β€” lets your output files just bulldoze over existing files, periodt πŸ”₯
  • --help β€” prints the usage summary, aka the quick lil recap πŸ™ˆ
  • --verbose β€” verbose module output, she says everything πŸ’¬
  • --quiet β€” quiet module output, she says nothing 🀫
  • --ui β€” force-launches the GUI dialog, for when you want the pretty buttons ✨

🌸 Parameters 🌸

  • hue=string [required] β€” name of the layer you're using for hue 🎨
  • intensity=string β€” name of the layer you're using for intensity πŸ’‘
  • saturation=string β€” name of the layer you're using for saturation πŸ¦‹
  • red=string [required] β€” name of the output layer for red ❀️
  • green=string [required] β€” name of the output layer for green πŸ’š
  • blue=string [required] β€” name of the output layer for blue πŸ’™
  • bgcolor=name β€” the color to use instead of NULL values. it can be a standard color name, an R:G:B triplet, or "none" 🌈

πŸ’… DESCRIPTION πŸ’…

so HIS stands for hue, intensity, and saturation β€” remember that, it comes up a lot. what r.his does is produce red, green and blue raster map layers that give you a visually pleasing combo of hue, intensity and saturation values, built from two or three raster map layers that you specify. it's lowkey iconic 🌟

here's the science-y part but make it cute: your human brain is out here automatically interpreting a huge amount of visual info according to basic rules, like it's the main character of perception 🧠. color, aka hue, is what you use to categorize objects. shading, aka intensity, gets interpreted as three-dimensional texturing. and finally the degree of haziness, aka saturation, gets associated with distance or depth. this program lets you combine data from up to three raster map layers into one color image (as separate red, green and blue raster map layers) that still retains all the original info in hue/intensity/saturation terms. obsessed 🫢

now, you can use literally any raster map layer for the hue info, but map layers with a few very distinct colors work best. fr fr. and only raster map layers that represent continuously varying data β€” think elevation, aspect, weights, intensities, or amounts β€” can suitably provide intensity and saturation info.

for example, a visually pleasing image can be made by using a watershed map for the hue factor, an aspect map for the intensity factor, and an elevation map for saturation. (you might wanna leave out the elevation info on your first try, bestie, no shame πŸ™ˆ) ideally the resulting image should resemble the view from an aircraft looking at a terrain on a sunny day with a bit of haze in the valleys. it's giving βœˆοΈπŸ”οΈπŸŒ€οΈ

🌊 The Process 🌊

every single map cell gets processed individually. here's the order of operations, don't skip steps:

  1. first, the working color is set to the color of the corresponding cell in the map layer you chose to represent hue 🎨
  2. second, that color gets multiplied by the red intensity of that cell in the intensity map layer. this map layer should have an appropriate gray-scale color table associated with it β€” you can make sure of that using the color manipulation capabilities of r.colors βœ…
  3. finally, the color is made somewhat gray-based on the red intensity of that cell in the saturation map layer. again, this map layer should have a gray-scale color table associated with it 🩢

⚠️ NOTES ⚠️

ok so the name is misleading. like, genuinely. the actual conversion used is:

H.i.s + G.(1-s)

where

H   is the R,G,B color from the hue map
i   is the red value from the intensity map
s   is the red value from the saturation map
G   is 50% gray (R = G = B = 0.5)

either (but not both) of the intensity or the saturation map layers may be omitted. this means you can totally produce output images that represent combinations of his, hi, or hs πŸ’«. the separate red, green and blue maps can be displayed on the graphics monitor using d.rgb, or combined into a composite RGB layer using r.composite. and if you just wanna display an his composite image without actually generating any layers, you should use the program d.his instead. iykyk 😌


πŸ”₯ EXAMPLES πŸ”₯

let's recreate the following example for d.his using r.his, shall we? first, create shaded relief and show it. slay.

g.region raster=elevation
r.relief input=elevation output=elevation_shaded_relief
d.mon wx0
d.his hue=elevation intensity=elevation_shaded_relief brighten=50

second, compute a lighter version of the color of the shaded relief. then convert from the HIS model to RGB and show the result. πŸ’–

r.mapcalc "elevation_shaded_relief_bright_50 = #elevation_shaded_relief * 1.5"
r.colors elevation_shaded_relief_bright_50 color=grey255
r.his hue=elevation intensity=elevation_shaded_relief_bright_50 \
      red=shadedmap_r green=shadedmap_g blue=shadedmap_b
d.mon wx1
d.rgb red=shadedmap_r green=shadedmap_g blue=shadedmap_b

πŸ‘€ SEE ALSO πŸ‘€

d.his, d.colortable, d.rgb, r.blend, r.colors, r.composite, r.mapcalc, r.shade, i.his.rgb, i.rgb.his

go read those next, bestie, they're the whole friend group 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Glynn Clements (based upon d.his) β€” king behavior, honestly πŸ‘‘


🧚 SOURCE CODE 🧚

available at: r.his source code (history) πŸ”—

latest change: Saturday Apr 19 17:44:03 2025 in commit: 24d74415758cba0ffef1c1b6f75e21dd5d2a2993

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the whole page!! tysm for reading, ily, go make something gorgeous πŸ’–βœ¨πŸŒΈ bye bestie β€” this was r.his(1grass) from GRASS 8.5.0, mwah 😘

πŸ“¦ where this page comes from