4 ms·
I was looking for a quick way to convert RGB 0-255 to RGB float 0.0-1.0 (often used in shaders and other areas of 3D programming) just the other day. This tool
by mattnewport 7y ago
I was looking for a quick way to convert RGB 0-255 to RGB float 0.0-1.0 (often used in shaders and other areas of 3D programming) just the other day. This tool doesn't currently seem to support that, would be a nice addition.
- AceJohnny2 7y agoIs it not sufficient to floating-point divide the input values by 255 ? Edit: I guess that, even as simple as it would be to implement, it still is another useful output format
- deleted 7y ago[deleted]
- mattnewport 7y agoSimple to implement yeah, hard for me to do in my head hence the need for a tool :-)
- contingencies 7y ago$ command |sed 's/$/\/255/' | bc # or similar?
- sharkdp 7y agoThank you for the feedback. I have added a new "rgb-float" format in the latest release: https://github.com/sharkdp/pastel/releases/tag/v0.5.3 https://github.com/sharkdp/pastel/releases/tag/v0.5.3
- mattnewport 7y agoAwesome, thanks!