Descriptioncolor_utils cleanup:
* Attempt to define and standardize usage of "luma" vs. "(relative) luminance" vs. "lightness", at least as far as color_utils functions, comments, and direct callers are concerned. Especially the first two terms are often both called "luminance" (universally, not just in Chrome code), so the distinction is confusing.
* Misc. cleanups to make caller code shorter or clearer.
* Naming consistency: remove "Get" from function names where we're not doing some simple "getter" operation, but rather computing a value.
* Modify some caller behaviors to be hopefully-more-correct
* Note that GetReadableColor() can accept values with alpha, it will just ignore the alpha.
* Add a PickContrastingColor() function, which is basically a subset of GetReadableColor(). This will be useful for an upcoming change where we want to choose between two fixed colors instead of luma-inverting a single input.
* Use more precise multipliers in Luma().
BUG=none
TEST=none
Committed: https://crrev.com/6a3e439037809fd5dccf11c4cd0a91fb6a637702
Cr-Commit-Position: refs/heads/master@{#379643}
Patch Set 1 #
Total comments: 16
Patch Set 2 : Remove accidental change #Patch Set 3 : Rename functions #Messages
Total messages: 20 (7 generated)
|