Grasshopper

algorithmic modeling for Rhino

Colour range or domain - inverted gradient component

Hi

im trying to filter a list of colours into domains, and havent found a solution...

its basically, like the inverse of what the gradient component does: instead of inputing a collection of numbers, and them, choosing the colour depending on where they sit on the gradient, I have a collection of colours, and want to map them into the colours threshold.

any light?

Views: 8233

Replies to This Discussion

Its not as simple as a 2D Gradient Map as there is this third dimension to it. R,G and B.

I have done something similar in the past by using a hypothetical box of boxes and categorised them as falling within which box.

I did this to try and reduce the amount of unique colours.

Maybe you can use this to come up with a solution to your problem

Attachments:

Hi Danny!

Thanks very much!

just wondering... is there a way to get, instead of 3 channels colours in the end, to get text? say, red, green, blue and black (one dimension)? ( Im getting super confused working with 3 dimensional values...). Then, i can just use match text to do what I want to.

that will solve all my problems!!

You should read the article Colours Everywhere by David on his I Eat Bugs Blog to see why naming colours is very limited for categorising colours.

It basically boils down to this image:

where the blobs represent the collection of known names for colours. The multitude of these sit on the Black/White Diagonal because its "Probably" easier for us to distinguish shades of colour over hues etc.

EDIT: I should point out that the singular out lying colours have been removed for ease of display

If you stick to RALs tough... https://gist.github.com/lunohodov/1995178

UPDATE the new file works better

Attachments:

It may be easier using HSL color space I think. What does your gradient look like?

Is this what you had in mind?

Attachments:

So what you are saying is out of 16 million colours we can name 213 and only 10 of those are green-ish :)

EDIT: Fred, Did you delete your first reply?

Thats only for the poor ral file I found!

And you can see that the preset gradient hardly intersects the ral space!

danny, Yes I had to replace the file it was wrong.

And you can see that the preset gradient hardly intersects the ral space!

This is exactly my point. [EDIT: the point David was making in that article] Most of the names we have for colours are resident close to the B/W Diagonal.

At first I thought I was going mad, but then I noticed the image was different :S

just mappes the system.drawings color names to the ral names :)

Much more greens in these...

Hey all

Thanks! I tried here, but its not quite that...

This is what I got:

but this is what I need to get:

sort of, be able to select, the colours and put those in a range, and give an one dimensional code (a, b or c or whatever...).... just, sort of, be able to get a list with the thresholds I want...

Any comments?

The colours in the ranges on the approach you sent are not very clear... it takes other colours in between the numbers, which are not so obvious (for me... Im  still a bit confused working with colours...) this is what i mean by having a sort of inverse gradient component...

Thanks very much!

Heres a very simple script that will allow you to set set the gradient grips with wires.

I think you can finish this by yourself...

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service