Jump to content

GD grayscale to color


hlstriker

Recommended Posts

Does anyone know how to convert grayscale to a selected color?

 

Say you have a palette ranging from black to white. Would it be possible to create a new palette based from the grayscale palette but with shades of blue instead.

 

For instance the lighter the shade of gray, the lighter the blue will be. (the same going for the darker the shade of gray the darker the shade of blue will be).

 

I could manually make my own blue palette but then every time I change the color I would have to create a new palette. So does anyone know how to do this dynamically?

Link to comment
Share on other sites

I'm not sure what you mean by format (png?) but I am using a color palette with all gray colors.

 

Black to white:

0,0,0

15,15,15

50,50,50

125,125,125

255,255,255

 

I'm just trying to make a new 256 color palette using the old gray palette shades. So light gray is light blue, and dark gray is dark blue on the new palette.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.