Improve color inspector
Summary: Before this change, color inspector used a color picker that showed: color, rgba, hex. The problem is that engineers have to click on it to see these values. This change leaves the picker as is, but presents both hex and rgba inlined within the inspector thus avoiding extra interactions. Reviewed By: antonk52 Differential Revision: D41495740 fbshipit-source-id: c8af01e3060d2e6725295418293b1e30679c1b1f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dbf3108c36
commit
ef64abb495
@@ -29,7 +29,7 @@ data class SpaceBox(val top: Int, val right: Int, val bottom: Int, val left: Int
|
||||
}
|
||||
|
||||
@kotlinx.serialization.Serializable
|
||||
data class Color(val r: Int, val g: Int, val b: Int, val alpha: Int) {
|
||||
data class Color(val r: Int, val g: Int, val b: Int, val a: Int) {
|
||||
companion object {
|
||||
fun fromColor(color: Int): Color {
|
||||
val alpha: Int = (color shr 24) and 0xFF / 255
|
||||
|
||||
Reference in New Issue
Block a user