# Wrong color displayed

**URL:** <https://forum.juce.com/t/wrong-color-displayed/37249>\
**Category:** General JUCE discussion\
**Created:** [January 21, 2020, 9:44am UTC](https://forum.juce.com/t/wrong-color-displayed/37249 "2020-01-21T09:44:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NBT](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nbt/32/14602_2.png) [@NBT](https://forum.juce.com/u/NBT)\
**Post date:** [January 21, 2020, 9:44am UTC](https://forum.juce.com/t/wrong-color-displayed/37249/1 "2020-01-21T09:44:15Z")

</div>

Hello,  
today I recognized, that Juce paints slitly diffrent color codes than the given ones. Why does it behave like this or am I doing something wrong?

For example, this:  
auto color = Colour(42, 42, 42);  
g.fillAll(color);

translates to a painted color of (46, 46, 46) (checked with colorpickers from other programs)  
Juce does it with every color I use. First I thought, is has to do something with opacity. But the opacity is 1.

I’m on windows-machine.

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [January 21, 2020, 10:37am UTC](https://forum.juce.com/t/wrong-color-displayed/37249/2 "2020-01-21T10:37:12Z")

</div>

Could this be related in the end?

> [@Incorrect image colour rendering in Pro Tools](https://forum.juce.com/t/incorrect-image-colour-rendering-in-pro-tools/37034/17):
>
> This is actually a macOS/Color Profile issue… I dealt with this issue and a client last week… and to prove it’s not a JUCE issue I created a test app and demonstrated to them that drawing a Photoshop image inside of JUCE and also opening it in Preview shows the “wrong” color: [[image] ](https://dl.dropboxusercontent.com/s/whnf8q7oj3522n3/iMac%20Mojave.png?dl=0) In this image is the PNG opened in Preview (top left) and painted in my JUCE app (top right) and a filled rectangle painted in JUCE (bottom right). Color Toolkit show…

If so, the problem is much deeper than assumed, so far only Mac and ProTools was reported, both factors are unrelated…

---

<div class="post-metadata">

**Author:** ![NBT](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nbt/32/14602_2.png) [@NBT](https://forum.juce.com/u/NBT)\
**Post date:** [January 21, 2020, 11:33am UTC](https://forum.juce.com/t/wrong-color-displayed/37249/3 "2020-01-21T11:33:59Z")

</div>

I created a png-file with plain fillcolor 42,42,42 and opened it in diffrent applications (windows-photo-app, Paint 3d, [Paint.net](http://Paint.net), inkscape). it has either (46, 46, 46) or (41, 41, 41), but never (42, 42, 42) when picking it back with the colorpicker from the program i created it with (Affinity Designer). Hmm, so does it mean, this is normal behaviour?

I’ve never experienced something like this befor. maybe because the diffrences are to suttle?

---

<div class="post-metadata">

**Author:** ![NBT](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nbt/32/14602_2.png) [@NBT](https://forum.juce.com/u/NBT)\
**Post date:** [January 21, 2020, 12:00pm UTC](https://forum.juce.com/t/wrong-color-displayed/37249/4 "2020-01-21T12:00:43Z")

</div>

To be honest, I don’t know, what’s going on. I have currently 4 Graphic-apps open and some browsers with html color-pickers or the 42-42-42 test-png loaded. now, I get everywhere the right color code when picking it with color-pickers. even juce is displaying the right color code?! do I need to understand this?

Edit: ok, I found the problem. By default, affinity uses the color palette adobe 1998. and there, the colorcodes seem to be diffrent. after converting the document to sRGB and re-adjusting the colors, I have identical colorcodes in every application including juce.
