working with Color8()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ambake001

I am hoping someone is able to guide me through how I convert pixel floating point color (e.g.0, 0, 0, 0,) to RGB value (e.g. 255.255.255) using Color8(). I have found the documentation and tried several ways to implement it, to no avail.

A tiny example would be a huge help if possible.

I am currently using get_pixelv and would like to convert it to 255 values and display that on screen. I currently have the floating points showing

Multiply each floating number to 255.

1.0 x 255 = 255
0.5 x 255 = 127 or 128 depending on the rounding

Also, I think Color8 has an alpha value?
Better convert that too.

nightrobin | 2021-02-12 15:53