You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shouldn't that be (0, RGB_MAX_0)? 0-255. I'm not totally sure what this does but it seems like 1 and 256 go together and 0 and 255 go together. Not 1 and 255.
(2)
#map the gradient
for x in range(QUARTER):
Hexgradient.putpixel((0, x), RGB_MAX_0)
for x in range(QUARTER):
Hexgradient.putpixel((0, QUARTER + x), RGB_MAX_0 - x)
for x in range(HALF):
Hexgradient.putpixel((0, BAD_HALF + x), BAD_THREE_QUARTERS - int(1.5 * x))
# create a horizontal gradient...
gradient = Image.new('L', (RGB_MAX_0, 1))
#map the gradient
for x in range(HALF):
gradient.putpixel((x, 0), int(1.5 * x))
for x in range(QUARTER):
gradient.putpixel((BAD_HALF + x, 0), BAD_THREE_QUARTERS + x)
for x in range(QUARTER):
gradient.putpixel((BAD_THREE_QUARTERS + x, 0), RGB_MAX_0 - 1)
I called these constants BAD_HALF and BAD_THREE_QUARTERS because they're very close to that proportion of the relevant RGB_MAX but they aren't precisely. I wonder if they should be precisely or if they've been very finely judged by eye.
The text was updated successfully, but these errors were encountered:
(1)
Shouldn't that be
(0, RGB_MAX_0)
? 0-255. I'm not totally sure what this does but it seems like 1 and 256 go together and 0 and 255 go together. Not 1 and 255.(2)
I called these constants
BAD_HALF
andBAD_THREE_QUARTERS
because they're very close to that proportion of the relevant RGB_MAX but they aren't precisely. I wonder if they should be precisely or if they've been very finely judged by eye.The text was updated successfully, but these errors were encountered: