Reputation: 8288
I am writing some code to create an image from pixel data stored in a medical image file (DICOM). Essentially, I have a two dimensional array (rows x columns) where each element of the array contains the colour of the pixel at that region in the image. The element values vary between 0 (black) and 1 (white). Values between 0-1 are differing shades of grey.
The language I am using (Xojo) allows me to set the colour of an individual pixel on a canvas but only using the RGB or HSV colour space.
How would I, for instance, get the HSV value for my pixel value of 0.9 (which would be a reasonably "light" shade of grey)?
Upvotes: 1
Views: 278
Reputation: 21
Use the HSV color value of
g.FillColor=HSV(0.0, 0.0, 0.9)
From Xojo Documentation
See the Image [email protected] in the top right corner.
Upvotes: 2