[Mono-bugs] [Bug 668156] New: UIColor.FromHSBA generates the wrong color

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jan 29 08:16:26 EST 2011



           Summary: UIColor.FromHSBA generates the wrong color
    Classification: Mono
           Product: MonoTouch
           Version: SVN
          Platform: Macintosh
        OS/Version: Apple iOS 4.2
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: gnorton at novell.com
        ReportedBy: david.black at casewise.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us)
AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4

A call to UIColor.FromHSBA(60, 1, 2, 2)
which should be yellow, returns red.

Reproducible: Always

Steps to Reproduce:
The following code will reproduce it

    float hue, sat, bright, alpha;
            UIColor.Yellow.GetHSBA (out hue, out sat, out bright, out alpha);
            // hue = 60, sat = 1, bright = 1, alpha = 1 This is correct

            var nc = UIColor.FromHSBA (hue, sat, bright, alpha);
            float r, g, b, a;
            nc.GetRGBA (out r, out g, out b, out a);
            // r = 1, g = 0, b = 0 which is wrong!

Actual Results:  

Expected Results:  

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list