Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Issue 220029: Simplify life for people trying to pick a "readable" foreground color by not ... (Closed)

Created:
11 years, 3 months ago by Peter Kasting
Modified:
9 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

Simplify life for people trying to pick a "readable" foreground color by not requiring them to provide two choices. This also speeds the call up a tiny bit by not calculating the background luminance twice. BUG=none TEST=none

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -37 lines) Patch
M app/gfx/color_utils.h View 1 chunk +8 lines, -5 lines 0 comments Download
M app/gfx/color_utils.cc View 1 2 chunks +18 lines, -10 lines 2 comments Download
M chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/views/location_bar_view.cc View 1 chunk +6 lines, -18 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Peter Kasting
11 years, 3 months ago (2009-09-24 01:33:55 UTC) #1
Peter Kasting
Brett, could you take a look at this since Ben is out?
11 years, 3 months ago (2009-09-24 17:59:39 UTC) #2
Peter Kasting
Musical reviewers. Brett seems to be under the weather. Scott, you want to rubber-stamp this?
11 years, 3 months ago (2009-09-24 21:33:21 UTC) #3
sky
Rubber stamp away. I think you should add a DCHECK as mentioned, but otherwise LGTM. ...
11 years, 3 months ago (2009-09-24 21:46:32 UTC) #4
Peter Kasting
http://codereview.chromium.org/220029/diff/2002/2003 File app/gfx/color_utils.cc (right): http://codereview.chromium.org/220029/diff/2002/2003#newcode73 Line 73: return (foreground_luminance > background_luminance) ? On 2009/09/24 21:46:32, ...
11 years, 3 months ago (2009-09-24 21:50:05 UTC) #5
sky
On Thu, Sep 24, 2009 at 2:50 PM, <pkasting@chromium.org> wrote: > > http://codereview.chromium.org/220029/diff/2002/2003 > File ...
11 years, 3 months ago (2009-09-24 22:16:35 UTC) #6
Peter Kasting
On 2009/09/24 22:16:35, sky wrote: > Ya, I saw that your code always guarantees at ...
11 years, 3 months ago (2009-09-24 22:20:16 UTC) #7
sky
11 years, 3 months ago (2009-09-24 22:22:37 UTC) #8
Cool.

Thanks,

  -Scott

On Thu, Sep 24, 2009 at 3:20 PM,  <pkasting@chromium.org> wrote:
> On 2009/09/24 22:16:35, sky wrote:
>>
>> Ya, I saw that your code always guarantees at least .05, but someone
>> else that decided to call it might not realize they need a value > 0.
>
> The checked-in version has some explicit comments here.
>
> http://codereview.chromium.org/220029
>

Powered by Google App Engine
This is Rietveld 408576698