New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 751021 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Oct 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature

Blocked on:
issue 738779

Blocking:
issue 751024
issue 755404



Sign in to add a comment

Expose accent color interface through chrome.notifications

Project Member Reported by tetsui@chromium.org, Aug 1 2017

Issue description

In new style notification, notification generated by system should have accent color.

Some of these notifications (e.g. ChromeVox, FilesApp) are generated by JavaScript in terms of the implementation.

Also, we may be able to expose the interface to third party extensions. It requires further discussion.
 
Blocking: 751024

Comment 2 by tetsui@chromium.org, Aug 31 2017

Blocking: 755404

Comment 3 by peter@chromium.org, Sep 1 2017

Cc: peter@chromium.org
Our plan for Web Notifications is to use the site's theme colour from its manifest:

https://w3c.github.io/manifest/#theme_color-member

Do extensions have something similar? I'm not opposed to a member in either case, but extensions do generally care more about platform uniformity.
Labels: M-63

Comment 5 by tetsui@chromium.org, Sep 25 2017

Labels: -M-63 M-64
Sorry, I missed #3. It seems currently there's no equivalent of theme color web app manifest, but I think it also makes sense to have something similar in manifest.json and use it for notification accent color. Thanks!

Comment 6 by tetsui@chromium.org, Sep 25 2017

Description: Show this description
Cc: omrilio@chromium.org sgabr...@chromium.org
Labels: -Pri-1 -M-64 Pri-2

Comment 8 by peter@chromium.org, Dec 1 2017

In playing with accent colours today for unrelated reasons (https://imgur.com/a/p2SmC), it struck me that the trickiest bit of exposing this ability in any way will be to ensure sufficient contrast.

Material Design specified that a certain contrast ratio needs to be met:
https://material.io/guidelines/usability/accessibility.html#accessibility-color-contrast

Do we have any way in Chromium to ensure that the contrast ratio between the accent color and the view's background is sufficient?

Android seems to implement this behaviour already, I get sensible results for really light colours when playing with Notification.Builder.setColor().
> Do we have any way in Chromium to ensure that the contrast ratio between the accent color and the view's background is sufficient?

https://cs.chromium.org/chromium/src/ui/gfx/color_utils.h?l=120&rcl=de6781cecdd5c31629bff92dd2874dae67025481

I this useful here?
Status: Archived (was: Assigned)

Sign in to add a comment