Skip to content

What is RGB color space in the HEX_to_RGB function? #1005

Answered by KelSolaar
hminle asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hminle,

So there is no RGB colourspace per-see, as it is mostly a change of notation. There are however some tiny smarts:

  • < 0 RGB colours are clamped
  • > 1 RGB colours are normalised: They are first decoded with the sRGB EOTF, normalised to the maximum channel value, then re-encoded with the sRGB EOTF-1

Cheers,

Thomas

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@hminle
Comment options

@KelSolaar
Comment options

@hminle
Comment options

Answer selected by hminle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants