# RGB Colours not coming out as expected

**URL:** <https://discourse.mcneel.com/t/rgb-colours-not-coming-out-as-expected/118904>\
**Category:** Grasshopper\
**Tags:** windows, mac\
**Created:** [February 20, 2021, 2:21am UTC](https://discourse.mcneel.com/t/rgb-colours-not-coming-out-as-expected/118904 "2021-02-20T02:21:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob.h.mackay](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/bob.h.mackay/32/476074_2.png) [@bob.h.mackay](https://discourse.mcneel.com/u/bob.h.mackay)\
**Post date:** [February 20, 2021, 2:21am UTC](https://discourse.mcneel.com/t/rgb-colours-not-coming-out-as-expected/118904/1 "2021-02-20T02:21:26Z")

</div>

Hi There,

I was trying to make myself a simple tool to display an integer using resistor colours, but some of the colours I was choosing display completely wrongly.

In the example here, I used the Colour Picker to choose (143, 72, 19), which is a fairly rich brown colour, shown correctly in the two little squares in the bottom-left of the picker, but when I then use the Custom Preview to apply this to a plane surface, the colour comes out as a much lighter orange colour.

 ![ResistorColoursTest](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/3/a/b3a8a6d2b13cb3124915df9cf735a915fb0dccb4.png)

Some of the other colours I was using are fine, but Orange (247,164,47) comes out as very similar to Yellow (255,255,0).

What am I doing wrong? Is this a Windows issue?

See component at the end of:  
[ResistorColoursTest.gh](https://discourse.mcneel.com/uploads/short-url/5biEYzhTtpUB1ZsEboaM4Uj4cBk.gh) (19.8 KB)

Bob

---

<div class="post-metadata">

**Author:** ![inno](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/inno/32/544036_2.png) [@inno](https://discourse.mcneel.com/u/inno)\
**Post date:** [February 20, 2021, 2:34am UTC](https://discourse.mcneel.com/t/rgb-colours-not-coming-out-as-expected/118904/2 "2021-02-20T02:34:27Z")

</div>

check if in Rhino you are in wireframe or shaded view

wireframe:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/5/7/8574539d229db12211f8ae3c0adf0804240526bb.png)

shaded:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/b/b/8bb19d022785ae75774191b97c75c8f328681bdb.png)

close enough I guess 🙂

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/5/7/3579d8f106538f49804f814169abbea88a2f3768.jpeg)

---

<div class="post-metadata">

**Author:** ![bob.h.mackay](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/bob.h.mackay/32/476074_2.png) [@bob.h.mackay](https://discourse.mcneel.com/u/bob.h.mackay)\
**Post date:** [February 20, 2021, 2:48am UTC](https://discourse.mcneel.com/t/rgb-colours-not-coming-out-as-expected/118904/3 "2021-02-20T02:48:14Z")

</div>

Sigh! I had not appreciated that wireframe view would change the colours. Thanks so much - shaded or rendered view seems to fix the problems!

Yes, I should go back and re-sample the colours from some recognised pallet for resistor colours. Your orange is better than mine.

Thank you again,

Bob

---

<div class="post-metadata">

**Author:** ![bob.h.mackay](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/bob.h.mackay/32/476074_2.png) [@bob.h.mackay](https://discourse.mcneel.com/u/bob.h.mackay)\
**Post date:** [February 20, 2021, 3:41am UTC](https://discourse.mcneel.com/t/rgb-colours-not-coming-out-as-expected/118904/4 "2021-02-20T03:41:55Z")

</div>

Fixed the colours to agree with Wikipedia, and converted to cluster:

[ResistorColours2.gh](https://discourse.mcneel.com/uploads/short-url/sv5yGKCg647Bls7p2yc76Mlfr46.gh) (19.1 KB)

Now, back to the real project!

Thanks again,

Bob

---

<div class="post-metadata">

**Author:** ![maje90](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/maje90/32/771922_2.png) [@maje90](https://discourse.mcneel.com/u/maje90)\
**Post date:** [February 20, 2021, 11:39am UTC](https://discourse.mcneel.com/t/rgb-colours-not-coming-out-as-expected/118904/5 "2021-02-20T11:39:01Z")

</div>

Conversion from Color to Material is incomplete.  
If you need a constant “flat” color, do something like this:

 ![2021-02-20 12_37_55-Grasshopper - unnamed](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/d/d/bddd67fb6ebc4d7628db85137b8a0c8958c013d0.png)

---

<div class="post-metadata">

**Author:** ![bob.h.mackay](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/bob.h.mackay/32/476074_2.png) [@bob.h.mackay](https://discourse.mcneel.com/u/bob.h.mackay)\
**Post date:** [February 20, 2021, 5:06pm UTC](https://discourse.mcneel.com/t/rgb-colours-not-coming-out-as-expected/118904/6 "2021-02-20T17:06:12Z")

</div>

Aha! More Black Magic!

I find these automatic type conversions that appear to ‘just work’, but may actually do something unexpected, to be so confusing! Colour → Material worked for some colours and failed for others, but only in wire-frame mode!

But yes, fixing Diffuse and Specular to Black and using only Emission for the colour give the right answer in all display modes.

Many thanks!

Bob
