# HDR and ColorTypes

**URL:** https://discourse.julialang.org/t/hdr-and-colortypes/127648
**Category:** Visualization
**Tags:** colors
**Created:** [April 2, 2025, 8:08pm UTC](https://discourse.julialang.org/t/hdr-and-colortypes/127648 "2025-04-02T20:08:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rmfritz](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rmfritz](https://discourse.julialang.org/u/rmfritz)
#### Post date: [April 2, 2025, 8:08pm UTC](https://discourse.julialang.org/t/hdr-and-colortypes/127648/1 "2025-04-02T20:08:06Z")

</div>

I’ve been working with HDR data, the Radiance RGBE and XYZE types, and I’ve looked a little at [LogLuv](http://www.anyhere.com/gward/papers/jgtpap1.pdf) and [OpenEXR](https://openexr.com/en/latest/TechnicalIntroduction.html#what-s-in-the-numbers), and I’ve run into a problem: the `AbstractRGB` ColorType doesn’t accommodate the RGB values that Radiance RGBE and OpenEXR use. `AbstractRGB` values are limited to the range [0,1]. RGBE uses physical values of radiance, _W·sr−1·m−2_, which have the range of [0,∞]; openEXR uses values higher than 1 to represent such things as fire and specular highlights.

I am thinking that an `AbstractHdrRGB` type might be a good idea, something perhaps declared as:

```
abstract type AbstractHdrRGB{T} <: Color{T,3} end

```

What do people here think?

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [April 3, 2025, 1:47pm UTC](https://discourse.julialang.org/t/hdr-and-colortypes/127648/2 "2025-04-03T13:47:12Z")

</div>

Just in case, have you looked [at this discourse post](https://discourse.julialang.org/t/pre-rfc-ann-color-related-packages-yuvcolortypes-cmykcolortypes-colorprofiles-hdrcolortypes-hdrimages/113032)?

---

<div class="post-metadata">

### Author: ![rmfritz](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rmfritz](https://discourse.julialang.org/u/rmfritz)
#### Post date: [April 3, 2025, 6:39pm UTC](https://discourse.julialang.org/t/hdr-and-colortypes/127648/3 "2025-04-03T18:39:08Z")

</div>

I have. I think it has a number of problems, though it might be a good place to start from. The biggest one, though, is that it has the RGBE type as a subtype of the `AbstractRGB` type, and that doesn’t allow for physically based units.

---

<div class="post-metadata">

### Author: ![rmfritz](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rmfritz](https://discourse.julialang.org/u/rmfritz)
#### Post date: [April 4, 2025, 12:13am UTC](https://discourse.julialang.org/t/hdr-and-colortypes/127648/4 "2025-04-04T00:13:49Z")

</div>

I think, though, I will see if Kimikage is willing to have me do further work on the HDR packages.
