r.his(1)

πŸ’– r.his πŸ’–

okay bestie, grab a strawberry πŸ“ and sit down, because we're about to talk about r.his, a member of the GRASS GIS User's Manual family (that's the manual name, not me being dramatic πŸ’…). This is a raster module. It's giving color transformation. It's giving RGB. It's giving HIS. It's giving IHS. All of that, no cap. ✨


🌈 KEYWORDS 🌈

raster, color transformation, RGB, HIS, IHS

i know, i know, it's a lot of acronyms. we'll get 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 color tables for NULL values πŸ’€ (yes, the NULLs get to be pretty too)
  • --overwrite β€” let the output files overwrite files that already exist. permission granted, be careful tho
  • --help β€” prints the usage summary, aka the "wait what does this do" button
  • --verbose β€” verbose module output, for when you want the module to talk
  • --quiet β€” quiet module output, for when you want it to not
  • --ui β€” force launching the GUI dialog. pop-up core 🌸

πŸ¦‹ Parameters πŸ¦‹

  • hue=string [required] β€” name of the layer that's gonna be your hue
  • intensity=string β€” name of the layer that's gonna be your intensity
  • saturation=string β€” name of the layer that's gonna be your saturation
  • red=string [required] β€” name of the output layer that's gonna be your red
  • green=string [required] β€” name of the output layer that's gonna be your green
  • blue=string [required] β€” name of the output layer that's gonna be your blue
  • bgcolor=name β€” the color to use instead of NULL values. either a standard color name, an R:G:B triplet, or "none". choose your fighter ⭐

πŸ’œ DESCRIPTION πŸ’œ

so. HIS stands for hue, intensity, and saturation. iconic trio, honestly. what r.his does is produce red, green and blue raster map layers that give you a visually pleasing combination of hue, intensity, and saturation values β€” and it pulls those values from two or three raster map layers that you specify. not me making decisions for you. 🧚

okay so here's the science part and it's actually so cool. your human brain 🧠 automatically interprets a HUGE amount of visual info according to basic rules. Color, aka hue, is how you 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. literally your brain doing free rendering. This program lets you take data from up to three raster map layers and combine them into a color image β€” in the form of separate red, green and blue raster map layers β€” that keeps the original information in terms of hue, intensity, and saturation. periodt. πŸ‘‘

now, while any raster map layer can be used to represent the hue info, the map layers that work best are the ones with a few very distinct colors. and listen β€” only raster map layers that represent continuously varying data (like elevation, aspect, weights, intensities, or amounts) can suitably be used to provide intensity and saturation information. don't try to make a categorical map do a continuous map's job, she will not slay. πŸ’€

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. (and the user may wish to leave out the elevation information for a first try β€” no pressure, bestie, start small 🫢) 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 ✈️ πŸ”οΈ β˜€οΈ and honestly? obsessed.

🌸 The Process 🌸

Every single map cell gets processed individually. one at a time. main character treatment, each and every cell. ✨

  1. First, the working color is set to the color of the corresponding cell in the map layer chosen to represent hue.
  2. Second, this color is 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 ensure this by 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.

gray-scale color tables both times. don't forget, or it's gonna look a mess 😭


πŸŽ€ NOTES πŸŽ€

ngl, the name is misleading. 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)

there it is. the math. the receipts. 🧾

Either (but not both) of the intensity or the saturation map layers may be omitted. which means it's possible to produce output images that represent combinations of his, hi, or hs. pick your vibe. 🌈

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're a user who wishes to simply display an his composite image without actually generating any layers, you should use the program d.his. yes that's a different program. yes it's right there. no we're not gonna be mad about it. πŸ’…


⭐ EXAMPLES ⭐

Recreate the following example for d.his using r.his.

First, create shaded relief and show it.

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 lighter version of color of shaded relief. Then convert from 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? not scary. you got this. πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

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

(the whole friend group. go say hi. 🫢)


πŸ‘‘ AUTHOR πŸ‘‘

Glynn Clements (based upon d.his)


πŸ¦‹ SOURCE CODE πŸ¦‹

Available at: r.his source code (history)

Accessed: Saturday Jan 17 05:40:46 2026

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

Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual


and that's the whole page, bestie πŸ’…βœ¨ this was r.his(1) from the GRASS GIS User's Manual, brought to you by GRASS 8.4.2, accessed Saturday Jan 17 05:40:46 2026, Β© 2003-2025 GRASS Development Team β€” go make something pretty with it, you absolute icon πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from