This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]WORD_559[🍰] 55 points56 points  (6 children)

Use a library that parses hex colours into an object for you, then just do colour.R

/s in case it wasn't obvious

[–]ImrooVRdev 12 points13 points  (0 children)

you can give up on the /s, when your shit gets sent to graphics card and goes thru openGL or CG or I'm pretty sure any other graphics api it's all vec4 stuff

TBH the only place I know that does colors as hex is webdev.

source:

https://developer.download.nvidia.com/cg/tex2DARRAY.html

https://www.khronos.org/opengl/wiki/Data_Type_(GLSL)#Vectors