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, anR:G:Btriplet, 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:
- first, the working color is set to the color of the corresponding cell in the map layer you chose to represent hue π¨
- 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β - 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
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms