RGB values scale of 0-255 in Houdini?

   1696   5   1
User Avatar
Member
188 posts
Joined: May 2021
Offline
In all other applications, like Photoshop, Illustrator, Paint, etc. the RGB values range from 0-255



But in Houdini, they range from 0 to 1.

How to do colour matching in Houdini for colours being used in other apps? Is there a way the colour SOP allows values from 0-255 and reinterprets them from 0 to 1 equivalent?
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
If you click on the parameter to open the colour editor, you can copy/paste a hex color code like CCABDF
Edited by Andr - Feb. 9, 2023 07:15:49
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
or you can create a new spare vector parameter, name it `pscolor`, set it to range 0-255 and then apply the following expression to the color parameter:
fit(ch("pscolorx"), 0, 255, 0, 1)

that remaps the 0-255 values from your input into the 0-1 range used by Houdini


check the example file
Edited by Andr - Feb. 9, 2023 07:38:48

Attachments:
pscolors_0-255.hiplc (99.2 KB)

User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
proceduralist
How to do colour matching in Houdini for colours being used in other apps? Is there a way the colour SOP allows values from 0-255 and reinterprets them from 0 to 1 equivalent?

The colors won't match anyway. Those values are for 8bit video space color, the values in Houdini and other CG apps are floating point linear color.
User Avatar
Member
188 posts
Joined: May 2021
Offline
Andr
or you can create a new spare vector parameter, name it `pscolor`, set it to range 0-255 and then apply the following expression to the color parameter:
fit(ch("pscolorx"), 0, 255, 0, 1)

that remaps the 0-255 values from your input into the 0-1 range used by Houdini


check the example file
Andr
If you click on the parameter to open the colour editor, you can copy/paste a hex color code like CCABDF
That seems to work! The hex values of the RGB values generated by your file are matching exactly! Thanks a ton!
User Avatar
Member
188 posts
Joined: May 2021
Offline
jsmack
proceduralist
How to do colour matching in Houdini for colours being used in other apps? Is there a way the colour SOP allows values from 0-255 and reinterprets them from 0 to 1 equivalent?

The colors won't match anyway. Those values are for 8bit video space color, the values in Houdini and other CG apps are floating point linear color.

They are matching indeed. Check the file.

Attachments:
Matched with HEX values.hip (83.3 KB)

  • Quick Links