Colour::darker

using latest tip.

juce::Colour::darker’s documentation says:

/** Returns a darker version of this colour.

        @param amountDarker     how much darker to make it - a value from 0 to 1.0 where 0 is
                                unchanged, and higher values make it darker
        @see withMultipliedBrightness
    */

I would expect that giving a value of 1.0 would result in black, but it seems to turn for example #808080 to #404040.
Colour::brighter has a similar issue too.

cheers, Yair

I wrote that method many many years ago, and TBH I think I vaguely remember copying it from the way the same thing worked in the Java SDK’s Color class.

If I wrote it again today, I would probably do it entirely differently, but I can’t change it now, because to do so would subtly mess-up lots of people’s UIs.

What do you think of the Lab colour stuff in VFLib?

I actually haven’t explored your colour stuff, Vinnie… I’m sure it’s excellent though :slight_smile:

Perhaps instead of changing the code you could fix the documentation? Currently it is misleading

Well, the docs are a bit vague, but I wouldn’t call it “misleading”… What would you suggest as a better wording?