Grasshopper

algorithmic modeling for Rhino

for some reason I need to present some object in a gradient color, It is much easier to create a gradient with HSV color code as you can use the HUE value to change the color.

therefore I use range component with a domain of 0 to 180, and a text component, and create a set of color code from 0,255,255 (red) to 180,255,255 (cyan) in a 11 step gradient,

but there is a problem I am facing now, it seems the custom preview and legend component can only accept RGB color code, so things I've done is last step doesnt turns out to a result that I am expecting, is there any method I can change HSV into RGB, so the component can read and display what I want?

Views: 2166

Replies to This Discussion

1. There's the HSV to RGB component, where you can give the HSV values.

2. There's a much easier way - using the interpolate method, see attached.

Attachments:

may I ask what was that component with "len / (step-1) " inside?

Expression

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service