Results 1 to 18 of 18

Thread: color spectrum question

  1. #1

    color spectrum question

    I read the part of this website about the "channel mixer" in the "convert a color photo into black and white" section it said.

    "The sum of the red, green, and blue percentages need to equal 100% in order to maintain roughly constant brightness"

    It was very interesting because I am trying to make a color spectrum with very level colors, possibly one with constant luminosity or constant brightness (I am unsure on the terminology) Basically the normal color spectrum has colors like yellow which appear much lighter than the darkest blue and I'm trying to make a spectrum with all colors that are more level.

    I use the program GIMP (which uses 360 different hue's) and I am wondering how to apply this to it to make a full spectrum

    maybe the spectrum I am looking for contains cyan yellow and magenta? again I'm not totally sure what i'm looking for does anyone have any ideas?
    Last edited by floatingpepsi; 6th May 2010 at 05:42 AM. Reason: typo

  2. #2
    Moderator Dave Humphries's Avatar
    Join Date
    May 2008
    Location
    Windsor, Berks, UK
    Posts
    16,737
    Real Name
    Dave Humphries :)

    Re: color spectrum question

    Hi there,

    Welcome to the CiC forums.

    Could I ask for a first name so we know how to address replies please?

    Could I also ask what the intended use of the information is?
    It will help us answer in the most relevant way.

    The reason GIMP appears to have 360 hues is simply that there are 360 degrees in a circle and hue is often described as an angle (e.g. as in the TV industry).

    You ought to have a read of the CiC Colour Perception Tutorial for more background information.

    Colour is a big subject; so until we (and you) know a little more about what your question should be, I/we risk confusing issues further if we start down one road and that's not where you want to go. To give an example, I'm not sure what you learnt of making B&W pictures from colour was much help was it?

    An interesting question, so do continue, we're keen to help,

  3. #3
    Steaphany's Avatar
    Join Date
    Apr 2009
    Location
    Somewhere in Texas
    Posts
    831
    Real Name
    Steaphany

    Re: color spectrum question

    Plain & simple - can't be done.

    Now for the why behind it.

    Human vision has a dynamic range which exceeds any medium used to present or display images. So, to some how make Red or Blue match Green, you will need a medium which can present your spectrum in at least an 18,000:1 range.

    Another factor is the color gamut that a particular medium possesses. Here too human vision greatly surpasses what is available. So, there is no technology that can "cover it all"

    For my reference, here is a page that I scanned from my book, "RCA Electro-Optics Handbook":

    color spectrum question

    Notice that the vertical scale is logarithmic.

    If I misunderstood what you're trying to do, read the CiC Colour Perception Tutorial Dave pointed you to and then provide more specifics.
    Last edited by Steaphany; 4th May 2010 at 04:03 PM. Reason: Added a bit more

  4. #4
    David's Avatar
    Join Date
    Apr 2008
    Location
    Cheshire and Dumfries & Galloway
    Posts
    732
    Real Name
    David

    Re: color spectrum question

    I'm not sure exactly what you're after, but the way I interpret your question is that you wish to create images in which the luminosity of all the colours is more equal than real colours. Another way of putting it would be that in your images, if you converted them to B/W then you would get a single grey. In fact, this is possible and I worked out how to do it a few years ago using the Gimp to create "equiluminant" palettes. It can be successful in that images become soft and the colours pastel, but the range of possible hues becomes very limited and the colour spectrum generally very narrow. (You cannot have a bright red and bright blue in the same image for example.) The real downside, however, is not what can be displayed on a screen, but what can be printed. It turns out that if you create "equiliuminant" palettes the colours are out of gamut for printers. Nevertheless, the idea is an interesting one as palettes with equal or very similar luminosity are and were used by artists to create some of the clever colour juxtapositions seen in art. The impressionist technique of "pointillism" is related to this idea.

    Cheers

    David

    Edit: I've looked out one of my images with an "equiluminant" palette, see below. So, if you open this image in the Gimp and desaturate it with the "luminosity" option, then the screen should go a uniform grey. Any other desaturation option and you get a more conventional B/W image.


    color spectrum question
    Last edited by David; 5th May 2010 at 12:19 PM.

  5. #5

    Re: color spectrum question

    How do you make an "equiluminant" palette in GIMP? I found something interesting in mathmap in GIMP, with a full color spectrum I went to combine then convolve and it seemed to level the brightness. do you know what convolve did exaclty?

    also when I desaturated your image it was almost completely gray except for the outline of the purple.

    and to answer Dave Humphries' question my name is bill and i'm trying to find the right color spectrum to make a randomization out of.

    EDIT- randomization meaning the image converted to random dots
    Last edited by floatingpepsi; 6th May 2010 at 06:35 AM.

  6. #6
    Moderator Dave Humphries's Avatar
    Join Date
    May 2008
    Location
    Windsor, Berks, UK
    Posts
    16,737
    Real Name
    Dave Humphries :)

    Re: color spectrum question

    Quote Originally Posted by floatingpepsi View Post
    and to answer Dave Humphries' question my name is bill and i'm trying to find the right color spectrum to make a randomization out of.
    Hi Bill,

    Thanks for that, although I must confess that even after looking up "randomization" on Wikipedia (which gave what I expected), I still don't 'get' the context of the request. Not that it matters, as with GIMP and those like David that are skilled in that, you seem to be making progress anyway

    Quote Originally Posted by floatingpepsi View Post
    also when I desaturated your image it was almost completely gray except for the outline of the purple.
    ... and that effect was almost certainly caused mainly by the jpg coding which will likely have produced non pure colours along the transition when it tried to code into 8 x 8 pixel blocks - I bet David's (tif?) original was almost perfect when desaturated.

    Cheers,

  7. #7
    Steaphany's Avatar
    Join Date
    Apr 2009
    Location
    Somewhere in Texas
    Posts
    831
    Real Name
    Steaphany

    Re: color spectrum question

    This is an interesting effect, sorry for not understanding the original question.

    I wonder if such a gamut could be defined which would be printable, though I'm sure every ink/paper combination would require a custom version.

  8. #8

    Re: color spectrum question

    What about your last idea. How did you create "equiluminant" palettes and how did you use that on the color spectrum? And after doing convolve on the spectrum, how much should I change the lightness to make all the colors be represented? (with full saturation)

  9. #9

    Re: color spectrum question

    In GIMP I am trying to do this: I am trying to find the colors in the color spectrum that when I go to colors/desaturate/luminosity, become a 50% value shade of gray.

    23 and 203 hue have 50% value already (I found this out by filling a 360 pixel wide image with the color spectrum) how do I find the other 358 colors with 50% value when desaturated?

  10. #10
    David's Avatar
    Join Date
    Apr 2008
    Location
    Cheshire and Dumfries & Galloway
    Posts
    732
    Real Name
    David

    Re: color spectrum question

    Hi All - I've been away for a few days and have missed this exchange until this morning. I'll have to look at my notes from a few years ago to get all the details of how to create equiluminant palettes. It's not that straightforward. Re your attempt to make my image grey I think Dave Humphries is correct. On my screen no problems. I'll report later.

    David

  11. #11
    David's Avatar
    Join Date
    Apr 2008
    Location
    Cheshire and Dumfries & Galloway
    Posts
    732
    Real Name
    David

    Re: color spectrum question

    Here is a potted version of my version of creating an equiluminant palette in the Gimp.

    Equiluminance Notes

    Definition: equiluminance, equiluminant, isoluminant – these refer to hues (colour) having the same luminance or luminosity, i.e. having no difference in “brightness”. Such hues render the same greyscale value upon luminosity desaturation using the Gimp.

    Luminance is the weighted average of the R, G and B channels as the eye perceives R, G and B values. Photoshop and Paint Shop Pro (PSP) software allegedly use the weighting of luminance (grey) = 0.3*R+0.59*G+0.11*B. This is the weighting often found in text books. However, the Gimp uses the following: grey = 0.21*R+0.71*G+0.08*B. This point is worth explaining further. If you take the R, G and B values of any hue, multiply them by the above factors and add the results together, then the resulting grey value is the luminance (“brightness”) as the human eye perceives it. You can, of course, weight the R, G and B values in any way you wish. However, the resulting greyscale image will not reflect the luminosity as the receptors in the eye would see it. Note as well that the most important channel is the green one at 71% with blue contributing a mere 8% to the grey and red 21%.

    You can use algebra and/or straight-line graphs to calculate equiluminant hues for any desired grey value. Here are some results for a grey value of 128 (mid-grey on the scale 0-255):

    R G B Hue Hue in degrees

    128 128 128 grey 0
    0 181 0 green 120
    0 162 162 cyan 180
    138 138 0 brown 60
    255 77 255 magenta 300
    0 153 255 pale blue 204
    255 102 0 orange 24

    Equiluminant hues form their own colour space – subgroups of the total colour space, however defined. In other words, for each luminance level (0-255) there will be a set of hues whose luminance is constant. For black (grey=0) and white (grey=255) there can be only one hue in the colour space, but several thousand hues appear to be possible for some parts of the luminosity range. How these colour spaces are distributed for any weighted average is not clear to me and may not be easily calculated.

    How then can an equiluminant palette be constructed? The problem is, first, to find all the hues that could contribute to any given luminance value, say 128. Here I found a useful dodge at www.brucelindbloom.com. There, under the INFO section you can find a downloadable RGB TIFF image containing all possible colours for computer display, over 16 million. Thus, download this image and open it in the Gimp.

    Here comes the smart bit. Duplicate the original layer. Select the duplicate layer and desaturate via luminosity. You will now have an upper layer that is the luminance version of 16 million colours. What we can do is take the dropper tool and find a pixel in the upper greyscale level corresponding to our desired luminance value, here 128. Remember the X,Y coordinates of that pixel (the pixel positioned at 1668,1920 happens to be one such). Now select the colour tool, using zero tolerance and value. Click on the point that you had selected. All points with that value will now have been selected! Change to the background, colour, layer. Copy, then paste as a New Image. This image, which contains all possible hues with a greyscale value of 128, can be saved as required. Note that you may not think that there is anything present in the image that you have just created. It appears as the underlying chequerboard pattern. However, if you scale up the image, diagonal lines of coloured pixels appear.

    A palette of the colours now needs to be constructed. Note that the Gimp does not have a good palette editing facility. I'm not sure any of the big name software does. Select: Windows>Dockable Dialogs>Palettes to bring up the Palettes box. Right click anywhere in the box and select Import Palette. Select the Image radio button, give it a name and then use the slider to select the number of colours (up to 10,000) you wish to have in this palette. In this test case, I've chosen 1024. Select the number of columns, although the default of 16 is satisfactory, and, most importantly select the interval. This determines how frequently the image is to be sampled for its colours. Select 8 as a useful number to give a good range of hues. Click import and the palette should be created and displayed in the palette list. Double left click on the palette thumbnail to display it and use the mouse to drag out a corner to give a suitable size. You now have an equiluminant palette (mainly reds, oranges, greens and blues) for the grey value 128.

    Apply the palette to an image of choice by loading your image, selecting Colour>Map>Palette Map. Your image will have the palette applied. But note that only 256 colours will be chosen from the actual palette map – I said the palette editor was not very good. Nevertheless, you now have an image displayed in (256) equiluminant colours. You can check this by desaturating via luminosity. It will go to a grey value of 128.

    It is possible to edit the palette map in various ways, for example by picking colours manually, or using a text editor or by just playing about. However, this is laborious.

    I bet floatingpepsi wishes he had never asked!!!

    Cheers

    David

  12. #12

    Re: color spectrum question

    Quote Originally Posted by David View Post

    Now select the colour tool, using zero tolerance and value. Click on the point that you had selected. All points with that value will now have been selected! Change to the background, colour, layer. Copy, then paste as a New Image. This image, which contains all possible hues with a greyscale value of 128, can be saved as required. Note that you may not think that there is anything present in the image that you have just created. It appears as the underlying chequerboard pattern. However, if you scale up the image, diagonal lines of coloured pixels appear.
    I have so much to say but first I need to complete your directions.

    I do not know exactly what "change to the background, colour, layer" means, so I was stuck at that step. how exactly do I do that?

  13. #13
    David's Avatar
    Join Date
    Apr 2008
    Location
    Cheshire and Dumfries & Galloway
    Posts
    732
    Real Name
    David

    Re: color spectrum question

    Hi - It's my English construction that is confusing you. The image you have comprises two layers, the upper one being the greyscale and the lower layer the one which is still coloured. The lower layer is also known as the background layer. Hence, chose the background layer, that is the one that is coloured. Let me know how you get on.

    David

  14. #14

    Re: color spectrum question

    I know it's probably really basic but what do you mean by "change to the background, colour, layer" specifically? but I understand what you said about layers. (so far I have the diagonal lines highlighted in the gray image)
    Last edited by floatingpepsi; 12th May 2010 at 04:56 AM.

  15. #15
    David's Avatar
    Join Date
    Apr 2008
    Location
    Cheshire and Dumfries & Galloway
    Posts
    732
    Real Name
    David

    Re: color spectrum question

    Just click on the lower layer.

    David

  16. #16
    Moderator Dave Humphries's Avatar
    Join Date
    May 2008
    Location
    Windsor, Berks, UK
    Posts
    16,737
    Real Name
    Dave Humphries :)

    Re: color spectrum question

    Hi Bill,

    Quote Originally Posted by David View Post
    Just click on the lower layer.
    So the next step is carried out on that (lower) layer and not the layer the previous step was carried out upon.

  17. #17

    Re: color spectrum question

    in "change to the background, colour, layer" what does "colour, layer" mean specifically? (so far I have the diagonal lines highlighted in the gray image)
    Last edited by floatingpepsi; 12th May 2010 at 04:58 AM.

  18. #18
    David's Avatar
    Join Date
    Apr 2008
    Location
    Cheshire and Dumfries & Galloway
    Posts
    732
    Real Name
    David

    Re: color spectrum question

    Bill - the background layer is the layer that has the colour image. Hence in English we can say the "background, colour, layer", where the word "colour" is separated by commas from the words "background" and "layer". In longer English, we would say, "Click on the background layer which is the layer that is coloured."

    As the meerkat says, "Simples! Eck!!"

    Cheers

    David

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •