-
Notifications
You must be signed in to change notification settings - Fork 10
IR gradients
When applying IR colour enhancement using the -c / --clut
option, a JSON gradient file is read and mapped to IR pixel intensity. To use a specific gradient, use -g / --gradient
with the gradient's path.
sanchez -o output\geostationary -s sample-images -c 0-1 -g Resources\Gradients\Purple-Yellow.json
The following gradient definitions are included in Sanchez. If you have a gradient that you think is worthy of inclusion, feel free to let me know.
This is the default gradient if none is specified via -g / --gradient
. It's defined in Resources/Gradients/red-blue.json
:
Alternative gradient, defined in Resources/Gradients/purple-yellow.json
:
Gradient files contain a list of RGB tuples and positions ranging from 0.0 - 1.0. Each gradient file should ideally have at least two colours - one at position 0.0 and one colour at position 1.0.
Colours are interpolated using CIE L*C*h for aesthetically pleasing results, so only key colours are required to be included.
Example gradient file structure:
[
{
"Colour": "ffffb2",
"Position": 0.0
},
{
"Colour": "fecc5c",
"Position": 0.25
},
{
"Colour": "fd8d3c",
"Position": 0.5
},
{
"Colour": "e31a1c",
"Position": 1.0
}
]
This example results in the following interpolated gradient:
- Color Brewer is a great source for sample map gradients.
- Colorpicker for data is another excellent resource for creating custom gradients in the CIE colour space.