[go: nahoru, domu]

Add support for the RGB color format to the new color picker.

Prior to this CL, the new color picker only supported the HEX color
format. Now, users can also view and/or manually change the selected
color in the RGB color format.

Users can switch between the HEX and RGB formats by clicking on the
format toggler, and if the user changes the color value in one format,
the color value for the other format also needs to be updated. To make
it easier to translate values from one format to another, helper
functions like hexToRGB and rgbToHex are being added to the Color class.

Bug: 982087
Change-Id: Id6926f25cc01a94044be7f0d4ed876451c3e9719
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717188
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Sanket Joshi <sajos@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#682933}
70 files changed