Closed Bug 826556 Opened 12 years ago Closed 11 years ago

Work - Change foreground texts to dark color on a light bg tile

Categories

(Firefox for Metro Graveyard :: Firefox Start, defect, P1)

x86
Windows 8.1
defect

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 23

People

(Reporter: ywang, Assigned: ally)

References

Details

(Whiteboard: feature=work)

Attachments

(1 file)

When FX generated a white bookmark tile bg, the foreground text didn't change to black. The readability on white tile is very poor. 

We need to identify a certain range of light colors, and match with dark foreground text.
Whiteboard: [metro-mvp?]
Summary: Change foreground texts to black when the tile bg is generated white color → Change foreground texts to dark color on a light bg tile
Product: Firefox → Firefox for Metro
Whiteboard: [metro-mvp?] → [metro-mvp][LOE:1]
Blocks: 831915
Whiteboard: [metro-mvp][LOE:1] → [metro-mvp][LOE:1] feature=work
Summary: Change foreground texts to dark color on a light bg tile → Work - Change foreground texts to dark color on a light bg tile
Whiteboard: [metro-mvp][LOE:1] feature=work → feature=work
Blocks: 848155
Component: General → Firefox Start
Assignee: nobody → ally
Priority: -- → P1
scope check, is this just for topsites tiles, or should i try for more general solution?
I'm fine accepting topsites-specific code for this.  If it happens to include any functions that seems more widely useful, we can add them somewhere like browser/metro/base/content/Util.js or mozIColorAnalyzer for others' enjoyment.
Hi Stephen, do we have a definition on the value of light colors?
It would be useful to have that info. Thanks!
Flags: needinfo?(shorlander)
Plain white #fff
Flags: needinfo?(shorlander)
yuan, shorlander, I think I poorly articulated what I was looking for:


let colorOfFavicon = mozIColorAnalyzer(siteFavicon);
if (colorOfFavicon > lightColorCutOffValue)
   item.textcolor = dark; // item bg color is too light, use dark text
else
   item.textcolor = #fff; //item bg is dark, use light color text

what is the value of lightColorCutOffValue ?
Flags: needinfo?(shorlander)
No longer blocks: 848155
worked out on irc. This bug will refactor the color code out of topsites, bug 848155 so that it can be used by bookmarks, fixing this issue and making our code a bit better in the process(and making it easier to test the color code)

for testing hte color code ideas, see suggestions in https://bugzilla.mozilla.org/show_bug.cgi?id=848155#c5
Flags: needinfo?(shorlander)
Blocks: 855451
wasnt picked up properly, but went in with  848155 as previously mentioned, updating this bug to match that one

https://hg.mozilla.org/mozilla-central/rev/ecd66e8c854f
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(jbecerra)
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:23.0) Gecko/20130404 Firefox/23.0

Verified that for a white bookmark tile background, the foreground text is black. The readability on white tile is ok. 

Also verified that for black bookmark tile background, the text is white and ok to read.
Status: RESOLVED → VERIFIED
Flags: needinfo?(jbecerra)
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: