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

Unified Diff: third_party/WebKit/Source/devtools/front_end/common/Color.js

Issue 2832653002: DevTools: brush up color blending and theming APIs. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkWaterfallColumn.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/common/Color.js
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Color.js b/third_party/WebKit/Source/devtools/front_end/common/Color.js
index ed25f69a236388ae333ce2b4a893177e14d2809f..10db6092691ad3c40e3a3ad8a780b72c9affe8e4 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/Color.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/Color.js
@@ -614,6 +614,16 @@ Common.Color = class {
rgba[3] = alpha;
return new Common.Color(rgba, Common.Color.Format.RGBA);
}
+
+ /**
+ * @param {!Common.Color} fgColor
+ * @return {!Common.Color}
+ */
+ blendWith(fgColor) {
+ var rgba = [];
+ Common.Color.blendColors(fgColor._rgba, this._rgba, rgba);
+ return new Common.Color(rgba, Common.Color.Format.RGBA);
+ }
};
/** @type {!RegExp} */
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkWaterfallColumn.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698